Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoShardCache = errors.New("kinesumer: shard cache not found") ErrEmptyShardIDs = errors.New("kinesumer: empty shard ids given") )
Error codes.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { App string // Application name. // Kinesis configs. KinesisRegion string KinesisEndpoint string // Only for local server. // If you want to consume messages from Kinesis in a different account, // you need to set up the IAM role to access to target account, and pass the role arn here. // Reference: https://docs.aws.amazon.com/kinesisanalytics/latest/java/examples-cross.html. RoleARN string // State store configs. StateStore *StateStore DynamoDBRegion string DynamoDBTable string DynamoDBEndpoint string // Only for local server. ScanLimit int64 ScanTimeout time.Duration ScanInterval time.Duration }
Config defines configs for the Kinesumer client.
type Kinesumer ¶
type Kinesumer struct {
// contains filtered or unexported fields
}
Kinesumer implements auto re-balancing consumer group for Kinesis. TODO(mingrammer): export prometheus metrics.
func NewKinesumer ¶
NewKinesumer initializes and returns a new Kinesumer client.
type StateStore ¶ added in v0.2.3
type StateStore interface { GetShards(ctx context.Context, stream string) (Shards, error) UpdateShards(ctx context.Context, stream string, shards Shards) error ListAllAliveClientIDs(ctx context.Context) ([]string, error) RegisterClient(ctx context.Context, clientID string) error DeregisterClient(ctx context.Context, clientID string) error PingClientAliveness(ctx context.Context, clientID string) error PruneClients(ctx context.Context) error ListCheckPoints(ctx context.Context, stream string, shardIDs []string) (map[string]string, error) UpdateCheckPoint(ctx context.Context, stream, shardID, seq string) error }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.