kinesis

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2016 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package kinesis provides structs for working with AWS Kinesis records.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Records []*Record `json:"Records"`
}

Event represents a Kinesis event with one or more records.

type HandlerFunc

type HandlerFunc func(*Event, *apex.Context) error

HandlerFunc unmarshals Kinesis events before passing control.

func (HandlerFunc) Handle

func (h HandlerFunc) Handle(data json.RawMessage, ctx *apex.Context) (interface{}, error)

Handle implements apex.Handler.

type Record

type Record struct {
	Kinesis struct {
		SchemaVersion  string `json:"kinesisSchemaVersion"`
		PartitionKey   string `json:"partitionKey"`
		SequenceNumber string `json:"sequenceNumber"`
		Data           []byte `json:"data"`
	}
	EventSource       string `json:"eventSource"`
	EventVersion      string `json:"eventVersion"`
	EventID           string `json:"eventID"`
	EventName         string `json:"eventName"`
	InvokeIdentityARN string `json:"invokeIdentityArn"`
	AWSRegion         string `json:"awsRegion"`
	EventSourceARN    string `json:"eventSourceARN"`
}

Record represents a single Kinesis record.

func (*Record) Data

func (r *Record) Data() []byte

Data returns the payload.

Jump to

Keyboard shortcuts

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