Documentation
¶
Index ¶
- Constants
- Variables
- func DefaultErrHandler(err k.Error)
- func ErrHandler(errHandler func(IError)) func(k.Error)
- type Error
- type ICheckpointer
- type IError
- type IKinesis
- type IKinesumer
- type IProvisioner
- type IRecord
- type Kinesumer
- func (kin *Kinesumer) Begin() (int, error)
- func (kin *Kinesumer) End()
- func (kin *Kinesumer) GetShards() (shards []*kinesis.Shard, err error)
- func (kin *Kinesumer) GetStreams() (streams []string, err error)
- func (kin *Kinesumer) LaunchShardWorker(shards []*kinesis.Shard) (int, *ShardWorker, error)
- func (kin *Kinesumer) Records() <-chan k.Record
- func (kin *Kinesumer) StreamExists() (found bool, err error)
- type Options
- type Reader
- type Record
- type ShardWorker
- func (s *ShardWorker) GetRecords(it string) ([]*kinesis.Record, string, int64, error)
- func (s *ShardWorker) GetRecordsAndProcess(it, sequence string) (cont bool, nextIt string, nextSeq string)
- func (s *ShardWorker) GetShardIterator(iteratorType string, sequence string, timestamp time.Time) (string, error)
- func (s *ShardWorker) RunWorker()
- func (s *ShardWorker) TryGetShardIterator(iteratorType string, sequence string, timestamp time.Time) string
- type Unit
Constants ¶
View Source
const ( ECrit = "crit" EError = "error" EWarn = "warn" EInfo = "info" EDebug = "debug" )
View Source
const ( // According to the Kinesis limits documentation: // // Each shard can support up to 5 transactions per second for // reads, up to a maximum total data read rate of 2 MB per second. // // See http://docs.aws.amazon.com/streams/latest/dev/service-sizes-and-limits.html DefaultGetRecordsThrottle = 200 * time.Millisecond )
Variables ¶
View Source
var DefaultOptions = Options{ ListStreamsLimit: 1000, DescribeStreamLimit: 10000, GetRecordsLimit: 10000, GetRecordsThrottle: DefaultGetRecordsThrottle, PollTime: 2000, MaxShardWorkers: 50, ErrHandler: DefaultErrHandler, DefaultIteratorType: "LATEST", ShardAcquisitionTimeout: 90 * time.Second, }
Functions ¶
func DefaultErrHandler ¶
func ErrHandler ¶
Types ¶
type ICheckpointer ¶
type ICheckpointer kinesumeriface.Checkpointer
type IKinesumer ¶
type IKinesumer kinesumeriface.Kinesumer
type IProvisioner ¶
type IProvisioner kinesumeriface.Provisioner
type Kinesumer ¶
type Kinesumer struct { Kinesis k.Kinesis Checkpointer k.Checkpointer Provisioner k.Provisioner Stream string Options *Options // contains filtered or unexported fields }
func (*Kinesumer) GetStreams ¶
func (*Kinesumer) LaunchShardWorker ¶
func (*Kinesumer) StreamExists ¶
type Options ¶
type Options struct { ListStreamsLimit int64 DescribeStreamLimit int64 GetRecordsLimit int64 // Determines how frequently GetRecords is throttled. The zero value is // DefaultGetRecordsThrottle. GetRecordsThrottle time.Duration // Amount of time to poll of records if consumer lag is minimal PollTime int MaxShardWorkers int ErrHandler func(k.Error) DefaultIteratorType string // How long to try and get shard iterator ShardAcquisitionTimeout time.Duration // ShardIteratorTimestamp is used when DefaultIteratorType is "AT_TIMESTAMP" ShardIteratorTimestamp time.Time }
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader provides an io.Reader implementation that can read data from a kinesis stream.
type Record ¶
type Record struct {
// contains filtered or unexported fields
}
func (*Record) MillisBehindLatest ¶
func (*Record) PartitionKey ¶
func (*Record) SequenceNumber ¶
type ShardWorker ¶
type ShardWorker struct { GetRecordsLimit int64 // contains filtered or unexported fields }
func (*ShardWorker) GetRecords ¶
func (*ShardWorker) GetRecordsAndProcess ¶
func (s *ShardWorker) GetRecordsAndProcess(it, sequence string) (cont bool, nextIt string, nextSeq string)
func (*ShardWorker) GetShardIterator ¶
func (*ShardWorker) RunWorker ¶
func (s *ShardWorker) RunWorker()
func (*ShardWorker) TryGetShardIterator ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.