Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var FunctionName string
FunctionName the name of the current Function
View Source
var FunctionVersion string
FunctionVersion is the published version of the current instance of the Function
View Source
var MemoryLimitInMB int
MemoryLimitInMB is the configured memory limit for the current instance of the Function
Functions ¶
func NewContext ¶
func NewContext(parent context.Context, lc *FunctionContext) context.Context
NewContext returns a new Context that carries value lc.
Types ¶
type ClientApplication ¶
type ClientApplication struct {
InstallationID string `json:"installation_id"`
AppTitle string `json:"app_title"`
AppVersionCode string `json:"app_version_code"`
AppPackageName string `json:"app_package_name"`
}
ClientApplication is metadata about the calling application.
type ClientContext ¶
type ClientContext struct {
Client ClientApplication
Env map[string]string `json:"env"`
Custom map[string]string `json:"custom"`
}
ClientContext is information about the client application passed by the calling application.
type FunctionContext ¶
type FunctionContext struct {
RequestID string
InvokedFunctionUnique string
ClientContext ClientContext
Namespace string
FunctionName string
FunctionVersion string
MemoryLimitInMb int32
TimeLimitInMs int32
}
FunctionContext is the set of metadata that is passed for every Invoke.
func FromContext ¶
func FromContext(ctx context.Context) (*FunctionContext, bool)
FromContext returns the FunctionContext value stored in ctx, if any.
Click to show internal directories.
Click to hide internal directories.