dlocker

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const TypeNode = "dlocker"

Variables

This section is empty.

Functions

func Deregister

func Deregister(name string)

Deregister 清理配置适配器

func NewBuilder

func NewBuilder() container.StandardBuilder

func Register

func Register(resolver xResover)

RegisterCache 注册配置文件适配器

Types

type DLocker

type DLocker interface {
	//expire 秒
	Acquire(expire int) (bool, error)
	Release() (bool, error)
	//expire 秒
	Renewal(expire int) error
}

type DLockerBuilder

type DLockerBuilder interface {
	Build(key string, opts ...Option) DLocker
}

type Option

type Option func(opts *Options)

func WithData added in v0.4.0

func WithData(data string) Option

type Options added in v0.4.0

type Options struct {
	Data string
}

type StandardLocker

type StandardLocker interface {
	GetDLocker() (q DLockerBuilder)
}

StandardLocker cache

func NewStandardLocker

func NewStandardLocker(c container.Container) StandardLocker

NewStandardLocker 创建 lock

Jump to

Keyboard shortcuts

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