package internal

import "k8s.io/kubernetes/Godeps/_workspace/src/google.golang.org/appengine/internal"

Package internal provides support for package appengine.

Programs should not use this package directly. Its API is not stable. Use packages appengine and appengine/* instead.

Index

Variables

var NamespaceMods = make(map[string]func(m proto.Message, namespace string))

NamespaceMods is a map from API service to a function that will mutate an RPC request to attach a namespace. The function should be prepared to be called on the same message more than once; it should only modify the RPC request the first time.

Functions

func AppID

func AppID(fqai string) string

func ApplyTransaction

func ApplyTransaction(pb proto.Message, t *pb.Transaction)

ApplyTransaction applies the transaction t to message pb by using the relevant setter passed to RegisterTransactionSetter.

func BackgroundContext

func BackgroundContext() *context

func ContextForTesting

func ContextForTesting(req *http.Request) *context

func Datacenter

func Datacenter(req interface{}) string

func DefaultVersionHostname

func DefaultVersionHostname(req interface{}) string

func InstanceID

func InstanceID() string

func Main

func Main()

Main is designed so that the complete generated main package is:

package main

import (
        "google.golang.org/appengine/internal"

        _ "myapp/package0"
        _ "myapp/package1"
)

func main() {
        internal.Main()
}

The "myapp/packageX" packages are expected to register HTTP handlers in their init functions.

func ModuleName

func ModuleName() string

func NewContext

func NewContext(req *http.Request) *context

func RegisterErrorCodeMap

func RegisterErrorCodeMap(service string, m map[int32]string)

RegisterErrorCodeMap is called from API implementations to register their error code map. This should only be called from init functions.

func RegisterTimeoutErrorCode

func RegisterTimeoutErrorCode(service string, code int32)

func RegisterTransactionSetter

func RegisterTransactionSetter(f interface{})

RegisterTransactionSetter registers a function that sets transaction information in a protocol buffer message. f should be a function with two arguments, the first being a protocol buffer type, and the second being *datastore.Transaction.

func RequestID

func RequestID(req interface{}) string

func ServerSoftware

func ServerSoftware() string

func VersionID

func VersionID() string

func VirtAPI

func VirtAPI(c caller, method string) string

VirtAPI invokes a virtual API call for the __go__ service. It is for methods that accept a VoidProto and return a StringProto. It returns an empty string if the call fails.

Types

type APIError

type APIError struct {
	Service string
	Detail  string
	Code    int32 // API-specific error code
}

APIError is the type returned by appengine.Context's Call method when an API call fails in an API-specific way. This may be, for instance, a taskqueue API call failing with TaskQueueServiceError::UNKNOWN_QUEUE.

func (*APIError) Error

func (e *APIError) Error() string

func (*APIError) IsTimeout

func (e *APIError) IsTimeout() bool

type CallError

type CallError struct {
	Detail string
	Code   int32
	// TODO: Remove this if we get a distinguishable error code.
	Timeout bool
}

CallError is the type returned by appengine.Context's Call method when an API call fails in a generic way, such as RpcError::CAPABILITY_DISABLED.

func (*CallError) Error

func (e *CallError) Error() string

func (*CallError) IsTimeout

func (e *CallError) IsTimeout() bool

type CallOptions

type CallOptions struct {
	Timeout time.Duration // if non-zero, overrides RPC default
}

Source Files

api.go app_id.go identity.go identity_vm.go internal.go metadata.go net.go transaction.go

Directories

PathSynopsis
Godeps/_workspace/src/google.golang.org/appengine/internal/aetestingPackage aetesting provides utilities for testing App Engine packages.
Godeps/_workspace/src/google.golang.org/appengine/internal/app_identityPackage app_identity is a generated protocol buffer package.
Godeps/_workspace/src/google.golang.org/appengine/internal/basePackage base is a generated protocol buffer package.
Godeps/_workspace/src/google.golang.org/appengine/internal/channelPackage channel is a generated protocol buffer package.
Godeps/_workspace/src/google.golang.org/appengine/internal/datastorePackage datastore is a generated protocol buffer package.
Godeps/_workspace/src/google.golang.org/appengine/internal/imagePackage image is a generated protocol buffer package.
Godeps/_workspace/src/google.golang.org/appengine/internal/logPackage log is a generated protocol buffer package.
Godeps/_workspace/src/google.golang.org/appengine/internal/mailPackage mail is a generated protocol buffer package.
Godeps/_workspace/src/google.golang.org/appengine/internal/memcachePackage memcache is a generated protocol buffer package.
Godeps/_workspace/src/google.golang.org/appengine/internal/modulesPackage modules is a generated protocol buffer package.
Godeps/_workspace/src/google.golang.org/appengine/internal/remote_apiPackage remote_api is a generated protocol buffer package.
Godeps/_workspace/src/google.golang.org/appengine/internal/searchPackage search is a generated protocol buffer package.
Godeps/_workspace/src/google.golang.org/appengine/internal/taskqueuePackage taskqueue is a generated protocol buffer package.
Godeps/_workspace/src/google.golang.org/appengine/internal/urlfetchPackage urlfetch is a generated protocol buffer package.
Godeps/_workspace/src/google.golang.org/appengine/internal/userPackage user is a generated protocol buffer package.
Godeps/_workspace/src/google.golang.org/appengine/internal/xmppPackage xmpp is a generated protocol buffer package.
Version
v0.18.2
Published
Jun 8, 2015
Platform
js/wasm
Imports
21 packages
Last checked
26 seconds ago

Tools for package owners.