Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssemblyMutex ¶
func AssemblyMutex(options ...ConfigOption)
AssemblyMutex the mutex config init
Types ¶
type ConfigOption ¶
type ConfigOption func(*config)
func WithCancelTime ¶
func WithCancelTime(cancelTime time.Duration) ConfigOption
WithCancelTime a time for redis conn need spend the max time
func WithExpiresTime ¶
func WithExpiresTime(expireTime time.Duration) ConfigOption
WithExpiresTime Duration of lock
func WithMaxOffsetTime ¶
func WithMaxOffsetTime(maxOffsetTime time.Duration) ConfigOption
WithMaxOffsetTime be set to priority about the max gradient times for the interval of requesting lock
func WithReties ¶
func WithReties(reties int32) ConfigOption
WithReties be set to priority about the gradient decreases for the interval of requesting lock,After how many repetitions
func WithStorageClient ¶
func WithStorageClient(client *redis.Client) ConfigOption
WithStorageClient the must be init
Click to show internal directories.
Click to hide internal directories.