Have new func return type

This commit is contained in:
Harlow Ward 2017-11-26 18:22:09 -08:00
parent e5e057d6aa
commit 955f74d553
2 changed files with 3 additions and 3 deletions

View file

@ -9,8 +9,8 @@ import (
"github.com/aws/aws-sdk-go/service/kinesis"
)
// NewKinesisClient returns a new wrapper around the Kinesis client
func NewKinesisClient() Client {
// NewKinesisClient returns client to interface with Kinesis stream
func NewKinesisClient() *KinesisClient {
svc := kinesis.New(session.New(aws.NewConfig()))
return &KinesisClient{svc}
}

View file

@ -156,7 +156,7 @@ func (c *Consumer) Scan(ctx context.Context, fn func(*Record) bool) error {
// ScanShard loops over records on a specific shard, calls the callback func
// for each record and checkpoints the progress of scan.
// Note: Returning `false` from the callback func will end the scan.
func (c *Consumer) ScanShard(ctx context.Context, shardID string, fn func(*Record) bool) (err error) {
func (c *Consumer) ScanShard(ctx context.Context, shardID string, fn func(*Record) bool) (err error) {
lastSeqNum, err := c.checkpoint.Get(c.streamName, shardID)
if err != nil {
return fmt.Errorf("get checkpoint error: %v", err)