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
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
type BrokerProps ¶
type BrokerProps struct {
System string
}
type S3Event ¶
type S3Event struct {
Records []json.RawMessage `json:"Records"`
}
Note: events.S3Event decodes all records, the swarm kernel protocol requires bytes.
type SinkProps ¶
type SinkProps struct { Bucket awss3.Bucket EventSource *awslambdaeventsources.S3EventSourceProps Function scud.FunctionProps }
Click to show internal directories.
Click to hide internal directories.