client/vendor/google.golang.org/appengine
knative-automation 2164243458
upgrade to latest dependencies (#1387)
bumping knative.dev/serving 69caf07...ee022f4:
  > ee022f4 Update net-certmanager nightly (# 11691)
  > 0e98289 Update net-contour nightly (# 11690)
  > 73c1c0f Update net-istio nightly (# 11689)
  > 317cde6 Add support for emptyDir volume type (# 11669)
  > 770a40f Update boilerplate copyright year (# 11687)
  > 0b09cdd upgrade to latest dependencies (# 11671)
  > 9a84c20 Update net-kourier nightly (# 11685)
  > df276ab Update net-contour nightly (# 11684)
  > be47608 Update net-certmanager nightly (# 11683)
  > 026291c drop use of knative.dev/pkg metricskey in tests (# 11679)
  > c85d5fe Update net-certmanager nightly (# 11677)
  > 68da2ee Update net-contour nightly (# 11676)
  > 5bceb54 Update net-kourier nightly (# 11675)
  > 8076b8b Fix order of parameters in conformance README (# 11678)
bumping knative.dev/eventing 0af15fd...25bd8ef:
  > 25bd8ef move source.StatsReporter from knative.dev/pkg (# 5594)
  > 1677431 upgrade to latest dependencies (# 5592)
bumping knative.dev/networking e937f69...7390d8c:
  > 7390d8c upgrade to latest dependencies (# 464)
  > 8925a50 upgrade to latest dependencies (# 463)
  > d965698 upgrade to latest dependencies (# 462)
bumping knative.dev/pkg 7d1b0f1...d9b7180:
  > d9b7180 minor bug when passing spoof options (# 2194)
  > 8931f82 remove source stats reporter (# 2193)
  > 591cb89 drop unused workflow (# 2192)
  > dbcf4cf removing default for KUBECONFIG to enable in cluster tests (# 2191)
  > 7764284 include OpenCensus in the list of metric backend (# 2189)
  > aff7376 drop stackdriver metrics and tracing exporters (# 2183)

Signed-off-by: Knative Automation <automation@knative.team>
2021-07-19 16:15:12 -07:00
..
internal upgrade to latest dependencies (#1387) 2021-07-19 16:15:12 -07:00
urlfetch Actually, vendor everything (#59) 2019-04-05 04:08:57 -07:00
.travis.yml Track floating deps at master (#932) 2020-07-15 07:42:32 -07:00
CONTRIBUTING.md Actually, vendor everything (#59) 2019-04-05 04:08:57 -07:00
LICENSE Actually, vendor everything (#59) 2019-04-05 04:08:57 -07:00
README.md chore: Update to Knative Serving 0.10.0 (#474) 2019-11-04 13:02:19 -08:00
appengine.go chore: Update to Knative Serving 0.10.0 (#474) 2019-11-04 13:02:19 -08:00
appengine_vm.go Actually, vendor everything (#59) 2019-04-05 04:08:57 -07:00
errors.go Actually, vendor everything (#59) 2019-04-05 04:08:57 -07:00
go.mod Update dependencies, pin k8s deps. (#855) 2020-05-26 00:39:49 -07:00
go.sum Update dependencies, pin k8s deps. (#855) 2020-05-26 00:39:49 -07:00
identity.go Actually, vendor everything (#59) 2019-04-05 04:08:57 -07:00
namespace.go Actually, vendor everything (#59) 2019-04-05 04:08:57 -07:00
timeout.go Actually, vendor everything (#59) 2019-04-05 04:08:57 -07:00
travis_install.sh Actually, vendor everything (#59) 2019-04-05 04:08:57 -07:00
travis_test.sh Actually, vendor everything (#59) 2019-04-05 04:08:57 -07:00

README.md

Go App Engine packages

Build Status

This repository supports the Go runtime on App Engine standard. It provides APIs for interacting with App Engine services. Its canonical import path is google.golang.org/appengine.

See https://cloud.google.com/appengine/docs/go/ for more information.

File issue reports and feature requests on the GitHub's issue tracker.

Upgrading an App Engine app to the flexible environment

This package does not work on App Engine flexible.

There are many differences between the App Engine standard environment and the flexible environment.

See the documentation on upgrading to the flexible environment.

Directory structure

The top level directory of this repository is the appengine package. It contains the basic APIs (e.g. appengine.NewContext) that apply across APIs. Specific API packages are in subdirectories (e.g. datastore).

There is an internal subdirectory that contains service protocol buffers, plus packages required for connectivity to make API calls. App Engine apps should not directly import any package under internal.

Updating from legacy (import "appengine") packages

If you're currently using the bare appengine packages (that is, not these ones, imported via google.golang.org/appengine), then you can use the aefix tool to help automate an upgrade to these packages.

Run go get google.golang.org/appengine/cmd/aefix to install it.

1. Update import paths

The import paths for App Engine packages are now fully qualified, based at google.golang.org/appengine. You will need to update your code to use import paths starting with that; for instance, code importing appengine/datastore will now need to import google.golang.org/appengine/datastore.

2. Update code using deprecated, removed or modified APIs

Most App Engine services are available with exactly the same API. A few APIs were cleaned up, and there are some differences:

  • appengine.Context has been replaced with the Context type from golang.org/x/net/context.
  • Logging methods that were on appengine.Context are now functions in google.golang.org/appengine/log.
  • appengine.Timeout has been removed. Use context.WithTimeout instead.
  • appengine.Datacenter now takes a context.Context argument.
  • datastore.PropertyLoadSaver has been simplified to use slices in place of channels.
  • delay.Call now returns an error.
  • search.FieldLoadSaver now handles document metadata.
  • urlfetch.Transport no longer has a Deadline field; set a deadline on the context.Context instead.
  • aetest no longer declares its own Context type, and uses the standard one instead.
  • taskqueue.QueueStats no longer takes a maxTasks argument. That argument has been deprecated and unused for a long time.
  • appengine.BackendHostname and appengine.BackendInstance were for the deprecated backends feature. Use appengine.ModuleHostnameand appengine.ModuleName instead.
  • Most of appengine/file and parts of appengine/blobstore are deprecated. Use Google Cloud Storage if the feature you require is not present in the new blobstore package.
  • appengine/socket is not required on App Engine flexible environment / Managed VMs. Use the standard net package instead.

Key Encode/Decode compatibiltiy to help with datastore library migrations

Key compatibility updates have been added to help customers transition from google.golang.org/appengine/datastore to cloud.google.com/go/datastore. The EnableKeyConversion enables automatic conversion from a key encoded with cloud.google.com/go/datastore to google.golang.org/appengine/datastore key type.

Enabling key conversion

Enable key conversion by calling EnableKeyConversion(ctx) in the /_ah/start handler for basic and manual scaling or any handler in automatic scaling.

1. Basic or manual scaling

This start handler will enable key conversion for all handlers in the service.

http.HandleFunc("/_ah/start", func(w http.ResponseWriter, r *http.Request) {
    datastore.EnableKeyConversion(appengine.NewContext(r))
})

2. Automatic scaling

/_ah/start is not supported for automatic scaling and /_ah/warmup is not guaranteed to run, so you must call datastore.EnableKeyConversion(appengine.NewContext(r)) before you use code that needs key conversion.

You may want to add this to each of your handlers, or introduce middleware where it's called. EnableKeyConversion is safe for concurrent use. Any call to it after the first is ignored.