using constants for sharditeratortype instead of string literals
This commit is contained in:
parent
2f0c13ed72
commit
249baa2c72
1 changed files with 2 additions and 2 deletions
|
|
@ -72,7 +72,7 @@ func New(streamName string, opts ...Option) (*Consumer, error) {
|
||||||
// new consumer with no-op checkpoint, counter, and logger
|
// new consumer with no-op checkpoint, counter, and logger
|
||||||
c := &Consumer{
|
c := &Consumer{
|
||||||
streamName: streamName,
|
streamName: streamName,
|
||||||
initialShardIteratorType: "TRIM_HORIZON",
|
initialShardIteratorType: kinesis.ShardIteratorTypeTrimHorizon,
|
||||||
checkpoint: &noopCheckpoint{},
|
checkpoint: &noopCheckpoint{},
|
||||||
counter: &noopCounter{},
|
counter: &noopCounter{},
|
||||||
logger: &noopLogger{
|
logger: &noopLogger{
|
||||||
|
|
@ -280,7 +280,7 @@ func (c *Consumer) getShardIterator(streamName, shardID, lastSeqNum string) (*st
|
||||||
}
|
}
|
||||||
|
|
||||||
if lastSeqNum != "" {
|
if lastSeqNum != "" {
|
||||||
params.ShardIteratorType = aws.String("AFTER_SEQUENCE_NUMBER")
|
params.ShardIteratorType = aws.String(kinesis.ShardIteratorTypeAfterSequenceNumber)
|
||||||
params.StartingSequenceNumber = aws.String(lastSeqNum)
|
params.StartingSequenceNumber = aws.String(lastSeqNum)
|
||||||
} else {
|
} else {
|
||||||
params.ShardIteratorType = aws.String(c.initialShardIteratorType)
|
params.ShardIteratorType = aws.String(c.initialShardIteratorType)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue