kinesis-consumer/buffer.go
Harlow Ward 18173842fb Use AWS SDK
Limit the amount of library dependencies by using the official AWS SDK.

https://github.com/harlow/kinesis-connectors/issues/19
2015-08-15 23:17:49 -07:00

16 lines
650 B
Go

package connector
// Buffer defines a buffer used to store records streamed through Kinesis. It is a part of the
// Pipeline utilized by the Pipeline.ProcessShard function. Records are stored in the buffer by calling
// the Add method. The buffer has two size limits defined: total total number of records and a
// time limit in seconds. The ShouldFlush() method may indicate that the buffer is full based on
// these limits.
type Buffer interface {
FirstSequenceNumber() string
Flush()
LastSequenceNumber() string
NumRecordsInBuffer() int
ProcessRecord(record interface{}, sequenceNumber string)
Records() []interface{}
ShouldFlush() bool
}