Documentation ¶
Index ¶
- Variables
- type DSyncOptions
- type Option
- func (Option) Default() option.Setting[DSyncOptions]
- func (Option) EtcdClient(cli *clientv3.Client) option.Setting[DSyncOptions]
- func (Option) EtcdConfig(config *clientv3.Config) option.Setting[DSyncOptions]
- func (Option) FastAddresses(addrs ...string) option.Setting[DSyncOptions]
- func (Option) FastAuth(username, password string) option.Setting[DSyncOptions]
- func (Option) FastSecure(secure bool) option.Setting[DSyncOptions]
- func (Option) FastTLSConfig(conf *tls.Config) option.Setting[DSyncOptions]
- func (Option) KeyPrefix(prefix string) option.Setting[DSyncOptions]
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Install = plugin.Install Uninstall = plugin.Uninstall )
Functions ¶
This section is empty.
Types ¶
type DSyncOptions ¶
type DSyncOptions struct { EtcdClient *clientv3.Client EtcdConfig *clientv3.Config KeyPrefix string WatchChanSize int FastUsername string FastPassword string FastAddresses []string FastSecure bool FastTLSConfig *tls.Config }
DSyncOptions contains various options for configuring distributed locking using etcd.
type Option ¶
type Option struct{}
Option is a struct used for setting options.
func (Option) Default ¶
func (Option) Default() option.Setting[DSyncOptions]
Default sets default values for DSyncOptions.
func (Option) EtcdClient ¶
EtcdClient sets the etcd client for DSyncOptions.
func (Option) EtcdConfig ¶
EtcdConfig sets the etcd config for DSyncOptions.
func (Option) FastAddresses ¶
func (Option) FastAddresses(addrs ...string) option.Setting[DSyncOptions]
FastAddresses sets the etcd server addresses in DSyncOptions.
func (Option) FastAuth ¶
func (Option) FastAuth(username, password string) option.Setting[DSyncOptions]
FastAuth sets the username and password for authentication in DSyncOptions.
func (Option) FastSecure ¶
func (Option) FastSecure(secure bool) option.Setting[DSyncOptions]
FastSecure sets whether to use a secure connection (HTTPS) in DSyncOptions.
func (Option) FastTLSConfig ¶
FastTLSConfig sets the TLS configuration for secure connections in DSyncOptions.
Click to show internal directories.
Click to hide internal directories.