aboutsummaryrefslogtreecommitdiff
path: root/vendor/google.golang.org/appengine/appengine_vm.go
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2016-06-06 14:44:38 +0100
committerNiall Sheridan <nsheridan@gmail.com>2016-06-06 14:44:38 +0100
commit067ad51b6a6ee8829612f51a6e6b2ade3eaa61b3 (patch)
tree301d2a7303e2b5db0c3fa1911d799e16f921d9dc /vendor/google.golang.org/appengine/appengine_vm.go
parent5ca59399fe0880368f88d17c0c9d781d836969c6 (diff)
parenta18a13fb09eac00cdacf1f74080524182b7243de (diff)
Merge pull request #17 from nsheridan/vendor
update dependencies
Diffstat (limited to 'vendor/google.golang.org/appengine/appengine_vm.go')
-rw-r--r--vendor/google.golang.org/appengine/appengine_vm.go56
1 files changed, 56 insertions, 0 deletions
diff --git a/vendor/google.golang.org/appengine/appengine_vm.go b/vendor/google.golang.org/appengine/appengine_vm.go
new file mode 100644
index 0000000..e4399ed
--- /dev/null
+++ b/vendor/google.golang.org/appengine/appengine_vm.go
@@ -0,0 +1,56 @@
+// Copyright 2015 Google Inc. All rights reserved.
+// Use of this source code is governed by the Apache 2.0
+// license that can be found in the LICENSE file.
+
+// +build !appengine
+
+package appengine
+
+import (
+ "golang.org/x/net/context"
+
+ "google.golang.org/appengine/internal"
+)
+
+// The comment below must not be changed.
+// It is used by go-app-builder to recognise that this package has
+// the Main function to use in the synthetic main.
+// The gophers party all night; the rabbits provide the beats.
+
+// Main is the principal entry point for an app running in App Engine "flexible environment".
+// It installs a trivial health checker if one isn't already registered,
+// and starts listening on port 8080 (overridden by the $PORT environment
+// variable).
+//
+// See https://cloud.google.com/appengine/docs/flexible/custom-runtimes#health_check_requests
+// for details on how to do your own health checking.
+//
+// Main never returns.
+//
+// Main is designed so that the app's main package looks like this:
+//
+// package main
+//
+// import (
+// "google.golang.org/appengine"
+//
+// _ "myapp/package0"
+// _ "myapp/package1"
+// )
+//
+// func main() {
+// appengine.Main()
+// }
+//
+// The "myapp/packageX" packages are expected to register HTTP handlers
+// in their init functions.
+func Main() {
+ internal.Main()
+}
+
+// BackgroundContext returns a context not associated with a request.
+// This should only be used when not servicing a request.
+// This only works in App Engine "flexible environment".
+func BackgroundContext() context.Context {
+ return internal.BackgroundContext()
+}