gateway

package
v0.0.0-...-5cd5cfe Latest Latest
Warning

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

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

README

AWS Lambda gateway plugin

The AWS Lambda gateway plugin leverages the AWS golang Lambda SDK to act as a bridge between the AWS lambda service and a Nitric Application.

Currently supported event types are:

  • API Gateway Events
  • SNS Events

Sublime's custom image

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type Event

type Event struct {
	events.APIGatewayV2HTTPRequest
	events.APIGatewayWebsocketProxyRequest

	Records []Record
	// contains filtered or unexported fields
}

An event struct that embeds the AWS event types that we handle

func (*Event) Type

func (e *Event) Type() eventType

func (*Event) UnmarshalJSON

func (e *Event) UnmarshalJSON(data []byte) error

type LambdaGateway

type LambdaGateway struct {
	gateway.UnimplementedGatewayPlugin
	// contains filtered or unexported fields
}

func (*LambdaGateway) Start

func (s *LambdaGateway) Start(opts *gateway.GatewayStartOpts) error

Start polling the lambda runtime for events and route the to workers for processing

func (*LambdaGateway) Stop

func (s *LambdaGateway) Stop() error

Stop will block until the lambda runtime is finished

type LambdaRuntimeHandler

type LambdaRuntimeHandler func(interface{})

type Record

type Record struct {
	EventSource      string
	EventSourceArn   string
	EventName        string
	ResponseElements map[string]string
	S3               events.S3Entity
	SNS              events.SNSEntity
}

An event struct that embeds the AWS event types that we handle

type ScheduleMessage

type ScheduleMessage struct {
	Schedule string
}

Jump to

Keyboard shortcuts

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