Documentation ¶
Index ¶
- Constants
- type AWSConfig
- type Record
- type Runner
- func (r *Runner) CheckShards() error
- func (r *Runner) Configure(a *AWSConfig)
- func (r *Runner) ConfigureWithMetrics(a *AWSConfig)
- func (r *Runner) Run()
- func (r *Runner) Stop()
- func (r *Runner) WithAsync(async bool) *Runner
- func (r *Runner) WithDebug(debug bool) *Runner
- func (r *Runner) WithIntervals(intervalCheckShards, intervalCheckRecords time.Duration) *Runner
Constants ¶
const ( RecordByteLimit = 1024 * 1024 PutRecordsLengthLimit = 500 PutRecordsByteLimit = 5 * 1024 * 1024 PutRecordsByteLimitPerMSPerShard = 1024 // assuming 1kb per ms PutRecordsLengthLimitPerMSPerShard = 1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSConfig ¶
type AWSConfig struct {
// contains filtered or unexported fields
}
func NewAWSConfig ¶
type Runner ¶
type Runner struct { // Message channel to send records to RecordChan chan Record Metrics *metrics.Metrics // contains filtered or unexported fields }
func New ¶
New returns a new Runner struct, with provided configurations. stream parameter is for setting the stream name, rbuf and ebuf are channel buffer sizes rbuf is for RecordChan that can help us achieve higher burst traffic. ebuf is for internal batch of PutRecords call.
func (*Runner) CheckShards ¶
CheckShards for checking the number of open shards available in the given kinesis stream
func (*Runner) Configure ¶
Configure should be called after New to configure the underlying kinesis client
func (*Runner) ConfigureWithMetrics ¶
ConfigureWithMetrics enables the Runner with metrics and should be called after New to configure the underlying kinesis client
func (*Runner) WithAsync ¶
WithAsync enables the async flag to not wait for PutRecords Response, and send the data asynchronously.