kinesisutil

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(accountAccessKeyID, accountSecretAccessKey, region string, logger *zap.SugaredLogger) (*kinesis.Kinesis, error)

Connect creates a new Kinesis-Streaming connection.

func Create

func Create(ctx context.Context, client *kinesis.Kinesis, streamName string, streamShards int64) error

Create function creates kinesis stream.

func Delete

func Delete(ctx context.Context, client *kinesis.Kinesis, streamName string) error

Delete function deletes kinesis stream by its name.

func Describe

func Describe(ctx context.Context, client *kinesis.Kinesis, streamName string) (*kinesis.DescribeStreamOutput, error)

Describe accepts kinesis client and stream name and returns kinesis stream description.

func GetRecord

func GetRecord(client *kinesis.Kinesis, shardIterator *string) (*kinesis.GetRecordsOutput, error)

GetRecord retrieves one stream record by specified shard iterator.

func GetShardIterators added in v1.5.0

func GetShardIterators(ctx context.Context, client *kinesis.Kinesis, streamName *string) ([]*string, error)

GetShardIterators returns "latest" shard iterator for specified stream.

func Publish

func Publish(ctx context.Context, client *kinesis.Kinesis, streamName string, msg []byte, logger *zap.SugaredLogger) error

Publish publishes msg to Kinesis stream.

func WaitUntilActive added in v1.5.0

func WaitUntilActive(ctx context.Context, client *kinesis.Kinesis, streamName string) error

Wait function periodically checks Kinesis stream status and returns if it's "Active"

Types

This section is empty.

Jump to

Keyboard shortcuts

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