Skip to content

Commit

Permalink
Add WithDatastore option.
Browse files Browse the repository at this point in the history
  • Loading branch information
nasdf committed Feb 6, 2021
1 parent fe35a3c commit 75e9366
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 75e9366

Please sign in to comment.