Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Emit ¶
func Emit(stream string, items interface{}) ([]kinesis.PutRecordsResultEntry, error)
Emit a slice of data to a kinesis stream This will convert the data into record entries and emit properly By default, the partition key is not set If an item implements Partitioner, partition key will be retrieved accordingly
func Handler ¶
func Handler(fn HandlerFunc) scaffold.HandlerFunc
Types ¶
type Event ¶
type Event struct {
Records []*EventRecord `json:"Records"`
}
func EventFromItems ¶
func EventFromItems(items interface{}) *Event
type EventRecord ¶
type EventRecord struct { EventSourceARN string `json:"eventSourceARN"` EventSource string `json:"eventSource"` AwsRegion string `json:"awsRegion"` EventID string `json:"eventID"` EventVersion string `json:"eventVersion"` Kinesis *EventRecordData `json:"kinesis"` InvokeIdentityArn string `json:"invokeIdentityARN"` EventName string `json:"eventName"` }
type EventRecordData ¶
type EventRecordData struct { ApproximateArrivalTimestamp float64 `json:"approximateArrivalTimestamp"` PartitionKey *string `json:"partitionKey"` Data string `json:"data"` KinesisSchemaVersion string `json:"kinesisSchemaVersion"` SequenceNumber string `json:"sequenceNumber"` }
func (*EventRecordData) JsonMarshal ¶
func (rk *EventRecordData) JsonMarshal(v interface{})
func (EventRecordData) JsonUnmarshal ¶
func (rk EventRecordData) JsonUnmarshal(v interface{}) error
type Partitioner ¶
type Partitioner interface {
PartitionKey() string
}
Click to show internal directories.
Click to hide internal directories.