Readme and linter fix (#102)

* update readme.md adding goreport

* update readme and fix issue found by linter

* update readme.md add Go badges

* update readme.md, fix go badges
This commit is contained in:
Dimas Yudha P 2019-09-01 08:43:26 +07:00 committed by Harlow Ward
parent 71bbc397e2
commit a252eb38c6
4 changed files with 5 additions and 3 deletions

View file

@ -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.

View file

@ -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

View file

@ -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) {

View file

@ -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 {