This commit is contained in:
Erik Johnston 2017-11-21 13:49:25 +00:00
parent 3c8a06b088
commit 2f0b2de340

View file

@ -34,7 +34,7 @@ type syncRequest struct {
userID string userID string
limit int limit int
timeout time.Duration timeout time.Duration
since *types.StreamPosition since *types.StreamPosition // nil means that no since token was supplied
wantFullState bool wantFullState bool
log *log.Entry log *log.Entry
} }
@ -70,8 +70,8 @@ func getTimeout(timeoutMS string) time.Duration {
return time.Duration(i) * time.Millisecond return time.Duration(i) * time.Millisecond
} }
// getSyncStreamPosition tries to pass a string taken from the API to a stream // getSyncStreamPosition tries to pass a 'since' token taken from the API to a
// position. If the string is empty then (nil, nil) is returned. // stream position. If the string is empty then (nil, nil) is returned.
func getSyncStreamPosition(since string) (*types.StreamPosition, error) { func getSyncStreamPosition(since string) (*types.StreamPosition, error) {
if since == "" { if since == "" {
return nil, nil return nil, nil