events: add store implementation (#1957)

This commit is contained in:
ben-toogood
2020-08-20 11:28:04 +01:00
committed by GitHub
parent 8738ed7757
commit 329bc2f265
12 changed files with 213 additions and 53 deletions

View File

@@ -0,0 +1,18 @@
package memory
import "github.com/micro/go-micro/v3/store"
// Options which are used to configure the in-memory stream
type Options struct {
Store store.Store
}
// Option is a function which configures options
type Option func(o *Options)
// Store sets the store to use
func Store(s store.Store) Option {
return func(o *Options) {
o.Store = s
}
}