Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
func NewHandler(handlerSymbol interface{}) functionHandler
NewHandler Creates the base function handler, which will do basic payload unmarshaling before defering to handlerSymbol. If handlerSymbol is not a valid handler, the returned function will be a handler that just reports the validation error.
func StartHandler ¶
func StartHandler(handler Handler)
StartHandler takes in a Handler wrapper interface which can be implemented either by a custom function or a struct.
Handler implementation requires a single "Invoke()" function:
func Invoke(context.Context, []byte) ([]byte, error)
func StartHandlerReturn ¶ added in v0.2.2
Types ¶
type Function ¶
type Function struct {
// contains filtered or unexported fields
}
func NewFunction ¶
func (*Function) Invoke ¶
func (fn *Function) Invoke(req *messages.InvokeRequest, response *messages.InvokeResponse) error
func (*Function) Ping ¶
func (fn *Function) Ping(req *messages.PingRequest, response *messages.PingResponse) error
Click to show internal directories.
Click to hide internal directories.