v0.1.25 Latest Latest

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

Go to latest
Published: Jan 22, 2024 License: LGPL-2.1 Imports: 18 Imported by: 0




This section is empty.


View Source
var (
	Install   = plugin.Install
	Uninstall = plugin.Uninstall


This section is empty.


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

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) 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

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

FastTLSConfig sets the TLS configuration for secure connections in 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