2014-07-25 06:03:41 +00:00
|
|
|
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 {
|
2014-11-15 21:44:46 +00:00
|
|
|
FirstSequenceNumber() string
|
|
|
|
|
Flush()
|
|
|
|
|
LastSequenceNumber() string
|
|
|
|
|
NumRecordsInBuffer() int
|
2015-08-16 05:20:34 +00:00
|
|
|
ProcessRecord(record interface{}, sequenceNumber string)
|
2014-11-16 01:00:37 +00:00
|
|
|
Records() []interface{}
|
2014-11-15 21:44:46 +00:00
|
|
|
ShouldFlush() bool
|
2014-07-25 06:03:41 +00:00
|
|
|
}
|