change use of store namespace/prefix in sql store

This commit is contained in:
Asim Aslam
2019-12-16 12:13:18 +00:00
parent 64e438a8d4
commit 0131e9468f
3 changed files with 79 additions and 18 deletions

View File

@@ -4,6 +4,15 @@ import (
"github.com/micro/go-micro/config/options"
)
type Options struct {
// nodes to connect to
Nodes []string
// Namespace of the store
Namespace string
// Prefix of the keys used
Prefix string
}
// Nodes is a list of nodes used to back the store
func Nodes(a ...string) options.Option {
return options.WithValue("store.nodes", a)