Documentation
¶
Index ¶
Constants ¶
View Source
const ( Invoke = EventType("INVOKE") Shutdown = EventType("SHUTDOWN") DefaultTelemetryPort = 8080 )
Variables ¶
View Source
var ( DefaultTelemetrySubscription = TelemetrySubscription{ SchemaVersion: "2022-12-13", Types: []string{"function", "platform"}, Buffering: TelemetryBuffering{ MaxItems: 500, MaxBytes: 1024 * 1024, TimeoutMs: 1000, }, Destination: TelemetryDestination{ Protocol: "HTTP", URI: fmt.Sprintf("http://sandbox.localdomain:%d", DefaultTelemetryPort), }, } )
Functions ¶
func MockExtensionAPIHandler ¶ added in v0.0.4
Types ¶
type Client ¶
type Client struct { Name string // Name is the name of the extension CallbackInvoke func(context.Context, *InvokeEvent) error CallbackShutdown func(context.Context, *ShutdownEvent) error // contains filtered or unexported fields }
Client is a client for Lambda Extensions API
func (*Client) SubscribeTelemetry ¶
func (c *Client) SubscribeTelemetry(ctx context.Context, subscription *TelemetrySubscription) error
SubscribeTelemetry subscribes to the telemetry API
type Event ¶
type Event struct { Invoke *InvokeEvent Shutdown *ShutdownEvent }
func (*Event) UnmarshalJSON ¶
type InvokeEvent ¶
type ShutdownEvent ¶
type TelemetryBuffering ¶
type TelemetryDestination ¶
type TelemetrySubscription ¶
type TelemetrySubscription struct { SchemaVersion string `json:"schemaVersion"` Types []string `json:"types"` Buffering TelemetryBuffering `json:"buffering"` Destination TelemetryDestination `json:"destination"` }
func NewDefaultTelemetrySubscription ¶
func NewDefaultTelemetrySubscription() *TelemetrySubscription
Click to show internal directories.
Click to hide internal directories.