Documentation ¶
Overview ¶
Package etcdcli 用于连接到 etcd 服务
Index ¶
- func Init(endpoints []string, opts ...Option) (*clientv3.Client, error)
- type Option
- func WithAuth(username string, password string) Option
- func WithAutoSyncInterval(duration time.Duration) Option
- func WithConfig(c *clientv3.Config) Option
- func WithDialTimeout(duration time.Duration) Option
- func WithLog(l *zap.Logger) Option
- func WithSecure(serverNameOverride string, certFile string) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(*options)
Option 用于设置 etcd 客户端的选项。
func WithAutoSyncInterval ¶
WithAutoSyncInterval 设置成员列表自动同步的时间间隔。
func WithDialTimeout ¶
WithDialTimeout 设置连接超时时间。
func WithSecure ¶
WithSecure 设置 TLS 安全连接。
Click to show internal directories.
Click to hide internal directories.