Documentation
¶
Index ¶
Constants ¶
View Source
const ( ParamRuntimeAPI = `lambda-runtime-api` ParamEntryPointName = `lamda-entrypoint-name` ParamEnableManualFlush = `enable-manual-flush` ParamTelemetryAddr = `telemetry-addr` )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Extension ¶
Extension exposes the internal type definition.
Note: This is not ideal but simplifies exposing the API.
func NewExtension ¶
func NewExtension(logger logrus.FieldLogger, server *statsd.Server, opts Options) (Extension, error)
NewExtension extends a `statsd.Server` by adding a server that integrates with the AWS Lambda Extension Runtime API to allow near native support for on host collection. The provided server is then run within the extension in additional to the server for AWS integration.
type Options ¶
type Options struct {
// RuntimeAPI is AWS service that is responsible for orchestrating
// the extension with the other Lambda's that are part of the deployment.
// This will set to `env:AWS_LAMBDA_RUNTIME_API` by default as per the docs,
// but can be overriden for testing purposes and validation.
RuntimeAPI string
// ExecutableName is the full file name of the lambda extension that is
// used to validate the bootstrap process.
ExecutableName string
// EnableManualFlush allows for Lambda's
// to control when the forwarder would send the accumlated metrics.
EnableManualFlush bool
// TelemetryAddr is used by the AWS runtime to publish
// events back to service.
TelemetryAddr string
}
Options is used to provide overrides when calling `NewExtension`
func NewOptionsFromEnvironment ¶
func NewOptionsFromEnvironment() Options
Click to show internal directories.
Click to hide internal directories.