Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-p2p-pubsub-router
Commits
58d4a764
Unverified
Commit
58d4a764
authored
Feb 12, 2021
by
Steven Allen
Committed by
GitHub
Feb 12, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #82 from nasdf/master
Add WithDatastore option.
parents
fe35a3cf
75e93666
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
pubsub.go
pubsub.go
+8
-0
No files found.
pubsub.go
View file @
58d4a764
...
@@ -589,3 +589,11 @@ func WithRebroadcastInitialDelay(duration time.Duration) Option {
...
@@ -589,3 +589,11 @@ func WithRebroadcastInitialDelay(duration time.Duration) Option {
return
nil
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
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment