kinesis

package
v1.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: MIT Imports: 12 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(cfg iaws.Config) *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, stream, partitionKey string, data []byte) (*kinesis.PutRecordOutput, error)

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

func (*API) PutRecords added in v1.0.0

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

PutRecords is a convenience wrapper for putting multiple records into a Kinesis stream.

func (*API) Setup

func (a *API) Setup(cfg iaws.Config)

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