events3

package module
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

View Source
const Category = "S3EventRecord"
View Source
const EnvConfigSourceS3 = "CONFIG_SWARM_SOURCE_S3"

Environment variable to config event source

View Source
const Version = "broker/events3/v0.20.1"

Variables

This section is empty.

Functions

func NewDequeuer added in v0.20.1

func NewDequeuer(opts ...Option) (*kernel.Dequeuer, error)

Create reader from AWS S3 Events

func Source added in v0.20.0

func Source(q *kernel.Dequeuer) (
	<-chan swarm.Msg[*events.S3EventRecord],
	chan<- swarm.Msg[*events.S3EventRecord],
)

The broker produces only events.S3EventRecord, the function is helper.

Types

type Broker

type Broker struct {
	constructs.Construct
	Bucket awss3.Bucket
	// contains filtered or unexported fields
}

func NewBroker

func NewBroker(scope constructs.Construct, id *string, props *BrokerProps) *Broker

func (*Broker) NewBucket

func (broker *Broker) NewBucket(props *awss3.BucketProps) awss3.Bucket

func (*Broker) NewSink

func (broker *Broker) NewSink(props *SinkProps) *Sink

type BrokerProps

type BrokerProps struct {
	System string
}

type Client added in v0.20.0

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

type Option added in v0.20.0

type Option func(*Client)

func WithConfig added in v0.20.0

func WithConfig(opts ...swarm.Option) Option

type S3Event

type S3Event struct {
	Records []json.RawMessage `json:"Records"`
}

Note: events.S3Event decodes all records, the swarm kernel protocol requires bytes.

type Sink

type Sink struct {
	constructs.Construct
	Handler awslambda.IFunction
}

func NewSink

func NewSink(scope constructs.Construct, id *string, props *SinkProps) *Sink

type SinkProps

type SinkProps struct {
	Bucket      awss3.Bucket
	EventSource *awslambdaeventsources.S3EventSourceProps
	Function    scud.FunctionProps
}

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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