Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WithDatastore option. #82

Merged
merged 1 commit into from
Feb 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add WithDatastore option.
  • Loading branch information
nasdf committed Feb 6, 2021
commit 75e936665459bccc4ba04a9a7ae4549d7f498a12
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
}
}