kinesisexporter

package
v1.39.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Mb = 1024 * 1024
)

Variables

View Source
var DefaultPartitionKey = func(context context.Context, _ exporter.FeatureEvent) string {
	context.Value("feature")

	return "default"
}

Functions

This section is empty.

Types

type DefaultKinesisSender

type DefaultKinesisSender struct {
	*kinesis.Client
}

func (*DefaultKinesisSender) SendMessages

type Exporter

type Exporter struct {
	// AwsConfig is the AWS SDK configuration object we will use to
	// upload your exported data files.
	AwsConfig *aws.Config

	// Format is the output format you want in your exported file.
	// Available format are JSON, CSV and Parquet.
	// Default: JSON
	Format string

	// kinesis.Options is a list of functional options to configure the Kinesis client.
	// Provide additional functional options to further configure the behavior of the client,
	// such as changing the client's endpoint or adding custom middleware behavior.
	// For more information about the options, please check:
	// https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/kinesis#Options
	KinesisOptions []func(*kinesis.Options)

	Settings *Settings
	// contains filtered or unexported fields
}

func (*Exporter) Export

func (e *Exporter) Export(ctx context.Context, logger *fflog.FFLogger, featureEvents []exporter.FeatureEvent) error

func (*Exporter) IsBulk

func (e *Exporter) IsBulk() bool

IsBulk reports if the producer can handle bulk messages. Will always return false for this exporter.

type MessageSender

type MessageSender interface {
	SendMessages(ctx context.Context, msgs *kinesis.PutRecordsInput) (*kinesis.PutRecordsOutput, error)
}

type Option

type Option = func(Settings) Settings

func WithExplicitHashKey

func WithExplicitHashKey(hashKey string) Option

func WithPartitionKey

func WithPartitionKey(partitionKey PartitionKeyFunc) Option

func WithStreamArn

func WithStreamArn(streamArn string) Option

func WithStreamName

func WithStreamName(streamName string) Option

type PartitionKeyFunc

type PartitionKeyFunc = func(context.Context, exporter.FeatureEvent) string

type Settings

type Settings struct {
	StreamName      *string
	StreamArn       *string
	PartitionKey    PartitionKeyFunc
	ExplicitHashKey *string
}

func NewSettings

func NewSettings(options ...Option) *Settings

Jump to

Keyboard shortcuts

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