Documentation ¶
Index ¶
- func GetEmbedEtcdClient() (*clientv3.Client, error)
- func GetEmbedEtcdEndpoints(server *embed.Etcd) []string
- func GetEtcdClient(useEmbedEtcd bool, useSSL bool, endpoints []string, certFile string, ...) (*clientv3.Client, error)
- func GetRemoteEtcdClient(endpoints []string) (*clientv3.Client, error)
- func GetRemoteEtcdSSLClient(endpoints []string, certFile string, keyFile string, caCertFile string, ...) (*clientv3.Client, error)
- func HasServer() bool
- func InitEtcdServer(useEmbedEtcd bool, configPath string, dataDir string, logPath string, ...) error
- func RemoveByBatch(removals []string, op func(partialKeys []string) error) error
- func SaveByBatch(kvs map[string]string, op func(partialKvs map[string]string) error) error
- func SaveByBatchWithLimit(kvs map[string]string, limit int, op func(partialKvs map[string]string) error) error
- func StartTestEmbedEtcdServer() (*embed.Etcd, string, error)
- func StopEtcdServer()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEmbedEtcdClient ¶
GetEmbedEtcdClient returns client of embed etcd server
func GetEmbedEtcdEndpoints ¶
GetEmbedEtcdEndpoints returns etcd listener address for endpoint config.
func GetEtcdClient ¶
func GetEtcdClient( useEmbedEtcd bool, useSSL bool, endpoints []string, certFile string, keyFile string, caCertFile string, minVersion string) (*clientv3.Client, error)
GetEtcdClient returns etcd client
func GetRemoteEtcdClient ¶
GetRemoteEtcdClient returns client of remote etcd by given endpoints
func GetRemoteEtcdSSLClient ¶
func InitEtcdServer ¶
func InitEtcdServer( useEmbedEtcd bool, configPath string, dataDir string, logPath string, logLevel string, ) error
InitEtcdServer initializes embedded etcd server singleton.
func RemoveByBatch ¶
func SaveByBatch ¶
SaveByBatch there will not guarantee atomicity.
func SaveByBatchWithLimit ¶
func SaveByBatchWithLimit(kvs map[string]string, limit int, op func(partialKvs map[string]string) error) error
SaveByBatchWithLimit is SaveByBatch with customized limit.
func StartTestEmbedEtcdServer ¶
StartTestEmbedEtcdServer returns a newly created embed etcd server. ### USED FOR UNIT TEST ONLY ###
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.