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 ¶
- type InvocationClient
- func (ic *InvocationClient) ExitError(errorEnum string, exitError error) error
- func (ic *InvocationClient) InitError(errorEnum string, initError error) error
- func (ic *InvocationClient) LogRegister(subscriptionRequest *api.LogSubscription) error
- func (ic *InvocationClient) NextEvent() (*api.InvocationEvent, error)
- type RegistrationClient
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 ¶
func (rc *RegistrationClient) Register(registrationRequest api.RegistrationRequest) (*InvocationClient, *api.RegistrationResponse, error)
Register registers, with custom registration parameters.
func (*RegistrationClient) RegisterDefault ¶
func (rc *RegistrationClient) RegisterDefault() (*InvocationClient, *api.RegistrationResponse, error)
RegisterDefault registers for Invoke and Shutdown events, with no configuration parameters.