etcd_dsync

package
v0.1.26 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2024 License: LGPL-2.1 Imports: 17 Imported by: 2

Documentation

Index

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

func (Option) CustomTLSConfig(conf *tls.Config) option.Setting[DSyncOptions]

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

func (Option) EtcdClient(cli *clientv3.Client) option.Setting[DSyncOptions]

EtcdClient sets the etcd client for DSyncOptions.

func (Option) EtcdConfig

func (Option) EtcdConfig(config *clientv3.Config) option.Setting[DSyncOptions]

EtcdConfig sets the etcd config for DSyncOptions.

func (Option) KeyPrefix

func (Option) KeyPrefix(prefix string) option.Setting[DSyncOptions]

KeyPrefix sets the key prefix for locking keys in DSyncOptions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL