Implementation of postgres store

This commit is contained in:
Jake Sanders
2019-11-01 14:13:21 +00:00
parent 74286c2939
commit dee63b2b2c
4 changed files with 350 additions and 4 deletions

View File

@@ -4,7 +4,7 @@ import (
"github.com/micro/go-micro/config/options"
)
// Set the nodes used to back the store
// Nodes is a list of nodes used to back the store
func Nodes(a ...string) options.Option {
return options.WithValue("store.nodes", a)
}
@@ -13,3 +13,9 @@ func Nodes(a ...string) options.Option {
func Prefix(p string) options.Option {
return options.WithValue("store.prefix", p)
}
// Namespace offers a way to have multiple isolated
// stores in the same backend, if supported.
func Namespace(n string) options.Option {
return options.WithValue("store.namespace", n)
}