compo

package
v0.0.0-...-0025a43 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet is compo providers.

Functions

func NewSonyFlake

func NewSonyFlake() *sonyflake.Sonyflake

NewSonyFlake .

Types

type Limiter

type Limiter struct {
	L *rate.Limiter
	// contains filtered or unexported fields
}

type LimiterManager

type LimiterManager struct {
	// contains filtered or unexported fields
}

func NewLimiterManager

func NewLimiterManager() *LimiterManager

func (*LimiterManager) GetLimiter

func (lm *LimiterManager) GetLimiter(r rate.Limit, b int, key string) *Limiter

type LockBuilder

type LockBuilder struct {
	// contains filtered or unexported fields
}

func NewLockBuilder

func NewLockBuilder(rdb *redis.Client) *LockBuilder

NewLockBuilder .

func (*LockBuilder) NewLock

func (lb *LockBuilder) NewLock(ctx context.Context, name string, seconds int64) LockInterface

type LockInterface

type LockInterface interface {
	Get() bool
	Block(seconds int64) bool
	Release() bool
	ForceRelease()
}

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

func NewStorage

func NewStorage(c *config.Configuration, log *zap.Logger) *Storage

NewStorage .

func (*Storage) GetDefaultDiskType

func (s *Storage) GetDefaultDiskType() string

func (*Storage) GetDisk

func (s *Storage) GetDisk(disk ...string) (storage.Storage, error)

func (*Storage) IsLocal

func (s *Storage) IsLocal() bool

Directories

Path Synopsis
mq

Jump to

Keyboard shortcuts

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