1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-12 08:23:58 +02:00
go-micro/data/store/options.go

16 lines
329 B
Go
Raw Normal View History

2019-06-12 08:46:20 +02:00
package store
2019-06-11 18:20:52 +02:00
import (
2019-06-12 13:45:42 +02:00
"github.com/micro/go-micro/config/options"
2019-06-11 18:20:52 +02:00
)
2019-06-12 08:46:20 +02:00
// Set the nodes used to back the store
2019-06-11 18:20:52 +02:00
func Nodes(a ...string) options.Option {
2019-06-12 08:46:20 +02:00
return options.WithValue("store.nodes", a)
2019-06-11 18:20:52 +02:00
}
// Prefix sets a prefix to any key ids used
func Prefix(p string) options.Option {
2019-06-12 08:46:20 +02:00
return options.WithValue("store.prefix", p)
2019-06-11 18:20:52 +02:00
}