2020-08-18 18:19:53 +03:00
|
|
|
package memory
|
|
|
|
|
2020-08-19 17:47:17 +03:00
|
|
|
import "github.com/unistack-org/micro/v3/store"
|
2020-08-18 18:19:53 +03:00
|
|
|
|
|
|
|
// 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
|
|
|
|
}
|
|
|
|
}
|