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. Region string // Region name. (optional) ClientID string // Consumer group client id. (optional) // Kinesis configs. KinesisRegion string KinesisEndpoint string // Only for local server. EFOMode bool // On/off the Enhanced Fan-Out feature. // 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. // These configs are not used in EFO mode. 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 }
StateStore is a distributed key-value store for managing states.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.