client

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package client is a generic client for the AWS Lambda Extension API. The API's lifecycle begins with execution of the extension binary, which is expected to register. The extension then makes blocking requests for the next event. The response to the next event request is either a notification of the next event, or a shutdown notification.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InvocationClient

type InvocationClient struct {
	// contains filtered or unexported fields
}

InvocationClient is used to poll for invocation events. It is produced as a result of successful registration. The zero value is not usable.

func (*InvocationClient) ExitError

func (ic *InvocationClient) ExitError(errorEnum string, exitError error) error

func (*InvocationClient) InitError

func (ic *InvocationClient) InitError(errorEnum string, initError error) error

func (*InvocationClient) LogRegister added in v0.2.0

func (ic *InvocationClient) LogRegister(subscriptionRequest *api.LogSubscription) error

LogRegister registers for log events

func (*InvocationClient) NextEvent

func (ic *InvocationClient) NextEvent() (*api.InvocationEvent, error)

NextEvent awaits the next event.

type RegistrationClient

type RegistrationClient struct {
	// contains filtered or unexported fields
}

RegistrationClient is used to register, and acquire an InvocationClient. The zero value is not usable.

func New

func New(httpClient http.Client) *RegistrationClient

Constructs a new RegistrationClient. This is the entry point.

func (*RegistrationClient) Register

Register registers, with custom registration parameters.

func (*RegistrationClient) RegisterDefault

RegisterDefault registers for Invoke and Shutdown events, with no configuration parameters.

Jump to

Keyboard shortcuts

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