kinesis

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyStreamName = errors.New("kinesis stream name can't be empty")
	ErrEmptySession    = errors.New("kinesis session can't be nil")
)

Functions

This section is empty.

Types

type Publisher

type Publisher struct {
	// contains filtered or unexported fields
}

Publisher holds the kinesis connection and the stream name.

func NewPublisher

func NewPublisher(ctx context.Context, cfg SessionConfig) (*Publisher, error)

NewPublisher creates a new kinesis connection.

func (*Publisher) Publish

func (p *Publisher) Publish(ctx context.Context, streamName string, data []byte) error

Publish publish the data to the correct stream. nolint: exhaustivestruct

type SessionConfig

type SessionConfig struct {
	Endpoint   string
	Region     string
	Timeout    time.Duration `default:"5s"`
	MaxRetries int           `split_words:"true" default:"3"`
}

Jump to

Keyboard shortcuts

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