kinesis

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertEventsRecords

func ConvertEventsRecords(records []events.KinesisEventRecord) []*kinesis.Record

ConvertEventsRecords converts Kinesis records between the Lambda and Go SDK packages. This is required for deaggregating Kinesis records processed by AWS Lambda.

func New

func New() *kinesis.Kinesis

New returns a configured Kinesis client.

Types

type API

type API struct {
	Client kinesisiface.KinesisAPI
}

API wraps the Kinesis API interface.

func (*API) ActiveShards

func (a *API) ActiveShards(ctx aws.Context, stream string) (int64, error)

ActiveShards returns the number of in-use shards for a Kinesis stream.

func (*API) GetTags added in v0.5.0

func (a *API) GetTags(ctx aws.Context, stream string) ([]*kinesis.Tag, error)

GetTags recursively retrieves all tags for a Kinesis stream.

func (*API) IsEnabled

func (a *API) IsEnabled() bool

IsEnabled returns true if the client is enabled and ready for use.

func (*API) PutRecord

func (a *API) PutRecord(ctx aws.Context, data []byte, stream, partitionKey string) (*kinesis.PutRecordOutput, error)

PutRecord is a convenience wrapper for putting a record into a Kinesis stream.

func (*API) Setup

func (a *API) Setup()

Setup creates a new Kinesis client.

func (*API) UpdateShards

func (a *API) UpdateShards(ctx aws.Context, stream string, shards int64) error

UpdateShards uniformly updates a Kinesis stream's shard count and returns when the update is complete.

type Aggregate

type Aggregate struct {
	Record       *rec.AggregatedRecord
	Count        int
	MaxCount     int
	MaxSize      int
	PartitionKey string
}

Aggregate produces a KPL-compliant Kinesis record

func (*Aggregate) Add

func (a *Aggregate) Add(data []byte, partitionKey string) bool

Add inserts a Kinesis record into an aggregated Kinesis record https://github.com/awslabs/kinesis-aggregation/blob/398fbd4b430d4bf590431b301d03cbbc94279cef/python/aws_kinesis_agg/aggregator.py#L382

Jump to

Keyboard shortcuts

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