dlocker

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2022 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) DLocker
}

type Option

type Option func()

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