func New(hosts []string, config *store.Config) (store.Store, error) { consul.Register() s, err := libkv.NewStore( store.CONSUL, hosts, config, ) if err != nil { return nil, err } return &ConsulStorage{ GeneralStorage: general.New(s, string(store.CONSUL)), }, nil }
func New(hosts []string, config *store.Config) (store.Store, error) { etcd.Register() s, err := libkv.NewStore( store.ETCD, hosts, config, ) if err != nil { return nil, err } return &EtcdStorage{ GeneralStorage: general.New(s, string(store.ETCD)), }, nil }
func New(hosts []string, config *store.Config) (store.Store, error) { zookeeper.Register() s, err := libkv.NewStore( store.ZK, hosts, config, ) if err != nil { return nil, err } return &ZookeeperStorage{ GeneralStorage: general.New(s, string(store.ZK)), }, nil }
func New(hosts []string, config *store.Config) (store.Store, error) { boltdb.Register() s, err := libkv.NewStore( store.BOLTDB, hosts, config, ) if err != nil { return nil, err } return &BoltdbStorage{ GeneralStorage: general.New(s, string(store.BOLTDB)), }, nil }