Documentation ¶
Index ¶
- Constants
- func BuildURL(route string) string
- func EnableTelemetryCollection(args EnableTelemetryCollectionArgs) error
- func NextUrl() string
- func NoOpProcessEvent(ctx context.Context, id ID) error
- func RegisterExtension(registrationRoute string, timeout time.Duration) (ID, FunctionARN, error)
- type EnableTelemetryCollectionArgs
- type FunctionARN
- type HTTPClient
- type ID
- type TelemetrySubscriptionPayload
Constants ¶
const (
//HeaderExtID is the header name for the extension identifier
HeaderExtID = "Lambda-Extension-Identifier"
)
Variables ¶
This section is empty.
Functions ¶
func EnableTelemetryCollection ¶
func EnableTelemetryCollection(args EnableTelemetryCollectionArgs) error
EnableTelemetryCollection enables telemetry collections via AWS Telemetry API
func NoOpProcessEvent ¶
NoOpProcessEvent conforms to the Lambda Runtime API but act as a no-op this is required NOT to fail the extension (and customer code) when no api key has been set
func RegisterExtension ¶
RegisterExtension registers the serverless daemon and subscribe to INVOKE and SHUTDOWN messages. Returns either (the serverless ID assigned by the serverless daemon + the api key as read from the environment) or an error.
Types ¶
type EnableTelemetryCollectionArgs ¶
type EnableTelemetryCollectionArgs struct { ID ID RegistrationURL string RegistrationTimeout time.Duration LogsType string Port int CollectionRoute string Timeout int MaxBytes int MaxItems int }
EnableTelemetryCollectionArgs is the set of arguments used to call EnableTelemetryCollection
type HTTPClient ¶
HTTPClient represents an Http Client
type TelemetrySubscriptionPayload ¶
type TelemetrySubscriptionPayload struct { Buffering buffering `json:"buffering"` Destination destination `json:"destination"` Types []string `json:"types"` SchemaVersion string `json:"schemaVersion"` }
TelemetrySubscriptionPayload is the payload we send while subscribing to the AWS Telemetry API
func (*TelemetrySubscriptionPayload) MarshalJSON ¶
func (p *TelemetrySubscriptionPayload) MarshalJSON() ([]byte, error)
MarshalJSON marshals the given TelemetrySubscriptionPayload object