Update k8s apis to release-1.14 and update all of vendor
This commit is contained in:
5
vendor/google.golang.org/appengine/internal/api.go
generated
vendored
5
vendor/google.golang.org/appengine/internal/api.go
generated
vendored
@@ -579,7 +579,10 @@ func logf(c *context, level int64, format string, args ...interface{}) {
|
||||
Level: &level,
|
||||
Message: &s,
|
||||
})
|
||||
log.Print(logLevelName[level] + ": " + s)
|
||||
// Only duplicate log to stderr if not running on App Engine second generation
|
||||
if !IsSecondGen() {
|
||||
log.Print(logLevelName[level] + ": " + s)
|
||||
}
|
||||
}
|
||||
|
||||
// flushLog attempts to flush any pending logs to the appserver.
|
||||
|
12
vendor/google.golang.org/appengine/internal/identity.go
generated
vendored
12
vendor/google.golang.org/appengine/internal/identity.go
generated
vendored
@@ -31,9 +31,15 @@ func AppID(c netcontext.Context) string {
|
||||
// ../appengine.go. See that file for commentary.
|
||||
func IsStandard() bool {
|
||||
// appengineStandard will be true for first-gen runtimes (<= Go 1.9) but not
|
||||
// second-gen (>= Go 1.11). Second-gen runtimes set $GAE_ENV so we use that
|
||||
// to check if we're on a second-gen runtime.
|
||||
return appengineStandard || os.Getenv("GAE_ENV") == "standard"
|
||||
// second-gen (>= Go 1.11).
|
||||
return appengineStandard || IsSecondGen()
|
||||
}
|
||||
|
||||
// IsStandard is the implementation of the wrapper function of the same name in
|
||||
// ../appengine.go. See that file for commentary.
|
||||
func IsSecondGen() bool {
|
||||
// Second-gen runtimes set $GAE_ENV so we use that to check if we're on a second-gen runtime.
|
||||
return os.Getenv("GAE_ENV") == "standard"
|
||||
}
|
||||
|
||||
// IsFlex is the implementation of the wrapper function of the same name in
|
||||
|
1
vendor/google.golang.org/appengine/internal/main.go
generated
vendored
1
vendor/google.golang.org/appengine/internal/main.go
generated
vendored
@@ -11,5 +11,6 @@ import (
|
||||
)
|
||||
|
||||
func Main() {
|
||||
MainPath = ""
|
||||
appengine_internal.Main()
|
||||
}
|
||||
|
7
vendor/google.golang.org/appengine/internal/main_common.go
generated
vendored
Normal file
7
vendor/google.golang.org/appengine/internal/main_common.go
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
package internal
|
||||
|
||||
// MainPath stores the file path of the main package. On App Engine Standard
|
||||
// using Go version 1.9 and below, this will be unset. On App Engine Flex and
|
||||
// App Engine Standard second-gen (Go 1.11 and above), this will be the
|
||||
// filepath to package main.
|
||||
var MainPath string
|
21
vendor/google.golang.org/appengine/internal/main_vm.go
generated
vendored
21
vendor/google.golang.org/appengine/internal/main_vm.go
generated
vendored
@@ -12,9 +12,12 @@ import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
func Main() {
|
||||
MainPath = filepath.Dir(findMainPath())
|
||||
installHealthChecker(http.DefaultServeMux)
|
||||
|
||||
port := "8080"
|
||||
@@ -31,6 +34,24 @@ func Main() {
|
||||
}
|
||||
}
|
||||
|
||||
// Find the path to package main by looking at the root Caller.
|
||||
func findMainPath() string {
|
||||
pc := make([]uintptr, 100)
|
||||
n := runtime.Callers(2, pc)
|
||||
frames := runtime.CallersFrames(pc[:n])
|
||||
for {
|
||||
frame, more := frames.Next()
|
||||
// Tests won't have package main, instead they have testing.tRunner
|
||||
if frame.Function == "main.main" || frame.Function == "testing.tRunner" {
|
||||
return frame.File
|
||||
}
|
||||
if !more {
|
||||
break
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func installHealthChecker(mux *http.ServeMux) {
|
||||
// If no health check handler has been installed by this point, add a trivial one.
|
||||
const healthPath = "/_ah/health"
|
||||
|
Reference in New Issue
Block a user