registration

package
v0.0.0-...-c4caace Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (

	//HeaderExtID is the header name for the extension identifier
	HeaderExtID = "Lambda-Extension-Identifier"
)

Variables

This section is empty.

Functions

func BuildURL

func BuildURL(prefix string, route string) string

BuildURL builds and URL with a prefix and a route

func EnableLogsCollection

func EnableLogsCollection(
	id ID,
	registrationURL string,
	registrationTimeout time.Duration,
	logsType string,
	port int,
	collectionRoute string,
	timeout int,
	maxBytes int,
	maxItems int) error

EnableLogsCollection enables logs collections via AWS Logs API

Types

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient represents an Http Client

type ID

type ID string

ID is the extension ID within the AWS Lambda environment.

func RegisterExtension

func RegisterExtension(runtimeURL string, registrationRoute string, timeout time.Duration) (ID, error)

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.

func (ID) String

func (i ID) String() string

String returns the string value for this ID.

type LogSubscriptionPayload

type LogSubscriptionPayload struct {
	Buffering     buffering   `json:"buffering"`
	Destination   destination `json:"destination"`
	Types         []string    `json:"types"`
	SchemaVersion string      `json:"schemaVersion"`
}

LogSubscriptionPayload is the payload we send while subscribing to the AWS Logs API

func (*LogSubscriptionPayload) MarshalJSON

func (p *LogSubscriptionPayload) MarshalJSON() ([]byte, error)

MarshalJSON marshals the given LogSubscriptionPayload object

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL