diff --git a/README.md b/README.md index 078a10e..6605638 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Golang Kinesis Consumer -[![Build Status](https://travis-ci.com/harlow/kinesis-consumer.svg?branch=master)](https://travis-ci.com/harlow/kinesis-consumer) [![GoDoc](https://godoc.org/github.com/harlow/kinesis-consumer?status.svg)](https://godoc.org/github.com/harlow/kinesis-consumer) +![technology Go](https://img.shields.io/badge/technology-go-blue.svg) [![Build Status](https://travis-ci.com/harlow/kinesis-consumer.svg?branch=master)](https://travis-ci.com/harlow/kinesis-consumer) [![GoDoc](https://godoc.org/github.com/harlow/kinesis-consumer?status.svg)](https://godoc.org/github.com/harlow/kinesis-consumer) [![GoReportCard](https://goreportcard.com/badge/github.com/harlow/kinesis-consumer)](https://goreportcard.com/report/harlow/kinesis-consumer) __Note:__ This repo is under active development adding [Consumer Groups #42](https://github.com/harlow/kinesis-consumer/issues/42). Master should always be deployable, but expect breaking changes in master over the next few months. diff --git a/options.go b/options.go index be306da..af7ce2e 100644 --- a/options.go +++ b/options.go @@ -51,7 +51,7 @@ func WithShardIteratorType(t string) Option { } } -// Timestamp overrides the starting point for the consumer +// WithTimestamp overrides the starting point for the consumer func WithTimestamp(t time.Time) Option { return func(c *Consumer) { c.initialTimestamp = &t diff --git a/store/ddb/ddb.go b/store/ddb/ddb.go index 0b5c9b5..dea0d86 100644 --- a/store/ddb/ddb.go +++ b/store/ddb/ddb.go @@ -84,7 +84,7 @@ type item struct { SequenceNumber string `json:"sequence_number"` } -// Get determines if a checkpoint for a particular Shard exists. +// GetCheckpoint determines if a checkpoint for a particular Shard exists. // Typically used to determine whether we should start processing the shard with // TRIM_HORIZON or AFTER_SEQUENCE_NUMBER (if checkpoint exists). func (c *Checkpoint) GetCheckpoint(streamName, shardID string) (string, error) { diff --git a/store/ddb/retryer.go b/store/ddb/retryer.go index bad3049..646bb6c 100644 --- a/store/ddb/retryer.go +++ b/store/ddb/retryer.go @@ -10,10 +10,12 @@ type Retryer interface { ShouldRetry(error) bool } +// DefaultRetryer . type DefaultRetryer struct { Retryer } +// ShouldRetry when error occured func (r *DefaultRetryer) ShouldRetry(err error) bool { if awsErr, ok := err.(awserr.Error); ok { if awsErr.Code() == dynamodb.ErrCodeProvisionedThroughputExceededException {