Documentation ¶
Index ¶
- Variables
- type DSyncOptions
- type Option
- func (Option) CustomAddresses(addrs ...string) option.Setting[DSyncOptions]
- func (Option) CustomAuth(username, password string) option.Setting[DSyncOptions]
- func (Option) CustomSecure(secure bool) option.Setting[DSyncOptions]
- func (Option) CustomTLSConfig(conf *tls.Config) option.Setting[DSyncOptions]
- 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) KeyPrefix(prefix string) option.Setting[DSyncOptions]
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Install = self.Install Uninstall = self.Uninstall )
Functions ¶
This section is empty.
Types ¶
type DSyncOptions ¶
type DSyncOptions struct { EtcdClient *clientv3.Client EtcdConfig *clientv3.Config KeyPrefix string WatchChanSize int CustomUsername string CustomPassword string CustomAddresses []string CustomSecure bool CustomTLSConfig *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) CustomAddresses ¶
func (Option) CustomAddresses(addrs ...string) option.Setting[DSyncOptions]
CustomAddresses sets the etcd server addresses in DSyncOptions.
func (Option) CustomAuth ¶
func (Option) CustomAuth(username, password string) option.Setting[DSyncOptions]
CustomAuth sets the username and password for authentication in DSyncOptions.
func (Option) CustomSecure ¶
func (Option) CustomSecure(secure bool) option.Setting[DSyncOptions]
CustomSecure sets whether to use a secure connection (HTTPS) in DSyncOptions.
func (Option) CustomTLSConfig ¶
CustomTLSConfig sets the TLS configuration for secure connections in DSyncOptions.
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.
Click to show internal directories.
Click to hide internal directories.