diff --git a/client.go b/client.go index 5a71bf6..60aca68 100644 --- a/client.go +++ b/client.go @@ -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} } diff --git a/consumer.go b/consumer.go index 51afaee..cc766d7 100644 --- a/consumer.go +++ b/consumer.go @@ -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)