snowflakepkg

package
v0.2.31 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMaxNodeId      = 1023             // 最大节点ID
	DefaultIdleDuration   = 60 * time.Second // 空闲ID时间:超过16s不续期,节点ID变为空闲的ID
	DefaultExtentDuration = 5 * time.Second  // 续期间隔时间
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Locker

type Locker interface {
	Lock(ctx context.Context, lockName string) (locker lockerpkg.Unlocker, err error)
}

Locker ...

func NewLockerFromCache

func NewLockerFromCache() Locker

NewLockerFromCache ...

func NewLockerFromRedis

func NewLockerFromRedis(redisCC redis.UniversalClient) Locker

NewLockerFromRedis ...

Jump to

Keyboard shortcuts

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