Documentation ¶
Overview ¶
Package serverless defines serverless handler context
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context interface { // Data incoming data Data() []byte // Tag incoming tag Tag() uint32 // Write writes data Write(tag uint32, data []byte) error // HTTP http interface HTTP() HTTP // WriteWithTarget writes data to sfn instance with specified target WriteWithTarget(tag uint32, data []byte, target string) error }
Context sfn handler context
type CronContext ¶ added in v1.17.5
type CronContext interface { // Write writes data Write(tag uint32, data []byte) error // HTTP http interface HTTP() HTTP // WriteWithTarget writes data to sfn instance with specified target WriteWithTarget(tag uint32, data []byte, target string) error }
CronContext sfn corn handler context
type HTTP ¶ added in v1.13.1
type HTTP interface { Send(req *HTTPRequest) (*HTTPResponse, error) Get(url string) (*HTTPResponse, error) Post(url string, contentType string, body []byte) (*HTTPResponse, error) }
HTTP http interface
type HTTPRequest ¶ added in v1.13.1
type HTTPRequest struct { Method string // GET, POST, PUT, DELETE, ... URL string // https://example.org Header map[string]string // {"Content-Type": "application/json"} Timeout int64 // timeout in milliseconds Body []byte // request body }
HTTPRequest http request
Click to show internal directories.
Click to hide internal directories.