Skip to content

Commit

Permalink
Merge pull request #82 from nasdf/master
Browse files Browse the repository at this point in the history
Add WithDatastore option.
  • Loading branch information
Stebalien authored Feb 12, 2021
2 parents fe35a3c + 75e9366 commit 58d4a76
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -589,3 +589,11 @@ func WithRebroadcastInitialDelay(duration time.Duration) Option {
return nil
}
}

// WithDatastore returns an option that overrides the default datastore.
func WithDatastore(datastore ds.Datastore) Option {
return func(store *PubsubValueStore) error {
store.ds = datastore
return nil
}
}

0 comments on commit 58d4a76

Please sign in to comment.