Documentation ¶
Index ¶
- Variables
- type DSyncOptions
- type Option
- func (Option) Default() option.Setting[DSyncOptions]
- func (Option) FastAddress(addr string) option.Setting[DSyncOptions]
- func (Option) FastAuth(username, password string) option.Setting[DSyncOptions]
- func (Option) FastDB(db int) option.Setting[DSyncOptions]
- func (Option) KeyPrefix(prefix string) option.Setting[DSyncOptions]
- func (Option) RedisClient(cli *redis.Client) option.Setting[DSyncOptions]
- func (Option) RedisConfig(conf *redis.Options) option.Setting[DSyncOptions]
- func (Option) RedisURL(url 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 { RedisClient *redis.Client RedisConfig *redis.Options RedisURL string KeyPrefix string FastUsername string FastPassword string FastAddress string FastDB int }
DSyncOptions contains various options for configuring distributed locking using redis.
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) FastAddress ¶
func (Option) FastAddress(addr string) option.Setting[DSyncOptions]
FastAddress sets the Redis server address 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) FastDB ¶
func (Option) FastDB(db int) option.Setting[DSyncOptions]
FastDB sets the Redis database index in DSyncOptions.
func (Option) KeyPrefix ¶
func (Option) KeyPrefix(prefix string) option.Setting[DSyncOptions]
KeyPrefix sets the key prefix for locking keys in DSyncOptions.
func (Option) RedisClient ¶
func (Option) RedisClient(cli *redis.Client) option.Setting[DSyncOptions]
RedisClient sets the Redis client for DSyncOptions.
func (Option) RedisConfig ¶
func (Option) RedisConfig(conf *redis.Options) option.Setting[DSyncOptions]
RedisConfig sets the Redis configuration options for DSyncOptions.
Click to show internal directories.
Click to hide internal directories.