ecronlock

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

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

func (*Component) NewLock added in v0.2.2

func (c *Component) NewLock(key string) ecron.Lock

type Config

type Config struct {
	Prefix string // 默认 "ecronlock:{appName}:"
}

Config ...

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig ...

type Container

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

func DefaultContainer

func DefaultContainer() *Container

func Load

func Load(key string) *Container

func (*Container) Build

func (c *Container) Build(options ...Option) *Component

Build ...

type Option

type Option func(c *Container)

func WithClient added in v0.2.2

func WithClient(client *eredis.Component) Option

WithClient Required. 设置 redis client

func WithPrefix added in v0.2.3

func WithPrefix(prefix string) Option

WithPrefix Optional. 设置 redis 锁的 Key 前缀

Jump to

Keyboard shortcuts

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