Documentation
¶
Overview ¶
Package lambda contain structure defentition for lambda information.
It include structures that are passed between the proxy and mlessd, and between mlessd and the runtime containers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientClient ¶
type ClientContext ¶
type ClientContext struct {
Client ClientClient `json:"client"`
Custom map[string]string `json:"custom"`
Env map[string]string `json:"env"`
}
type Context ¶
type Context struct {
RequestID string `json:"aws_request_id"`
Client *ClientContext `json:"client_context"`
Identity *Identity `json:"identity"`
ARN string `json:"invoked_function_arn"`
}
Context include the context data that is passed to the client Note: It does not include all the data that is stored in the context, some fields are duplicated in the environment and we take the value from there.
type InvokeReply ¶
type InvokeReply struct {
Result json.RawMessage `json:"result"`
ErrorType string `json:"errortype"`
InvokeID string `json:"invokeid"`
Errors bool `json:"errors,omitempty"`
Billing ReqeustBilling `json:"billing"`
}
InvokeReply is the type of message sent to the runner to start processing of a specific event
type InvokeRequest ¶
type InvokeRequest struct {
Context Context `json:"context"`
Event interface{} `json:"event"`
Deadline int64 `json:"deadline"` // number of milliseconds since January 1, 1970 UTC.
}
InvokeRequest is the type of message sent to the runner to start processing of a specific event
type Invoker ¶ added in v0.0.5
type Invoker interface {
Invoke(event interface{}, context Context, deadline time.Time) (json.RawMessage, error)
}
Invoker is the interface for a container running lambda function The Invoker is responsbile for serialization of the requests.
type ProxyRequest ¶
type ProxyRequest struct {
Context Context `json:"context"`
Remaining int `json:"remaining"` // remaining time in millis
Env map[string]string `json:"env"`
Event interface{} `json:"event"`
}
ProxyRequest is the request sent from the proxy to mlabd
type ReqeustBilling ¶ added in v0.0.6
type ReqeustBilling struct {
Duraion float64 `json:"duration"` // millisecond
Memory string `json:"memory"` // memroy size (should we have it here?)
Used int `json:"used"` // memory used (MB)
}
ReqeustBilling is the "billing record per invocation"
type StartupRequest ¶
StartupRequest include the initial request sent to the a runner
type StartupResponse ¶
type StartupResponse struct {
OK bool `json:"ok"`
}
StartupResponse is the reply sent by the runtime to a (succesful startup)