Slide 16
Slide 16 text
go-kinesis/batchproducer
type Producer interface {
Start() error
Stop() error
Add(data []byte, partitionKey string) error
Flush(timeout time.Duration, sendStats bool) (sent int, remaining int, err error)
}
// BatchingKinesisClient is a subset of KinesisClient to ease mocking.
type BatchingKinesisClient interface {
PutRecords(args *kinesis.RequestArgs) (resp *kinesis.PutRecordsResp, err error)
}
func New(client BatchingKinesisClient, streamName string, config Config) (Producer, error)