Documentation
¶
Index ¶
Constants ¶
View Source
const ( ActionTypeExtend = iota ActionTypeRefresh ActionTypeRenew )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hooks ¶
type Hooks interface {
OnRefresh(fn func())
OnExtend(fn func())
OnRenew(fn func())
OnExpired(fn func())
OnCancel(fn func())
}
type Lease ¶
type LeaseOption ¶
type LeaseOption func(*lease)
func OnCancel ¶
func OnCancel(fn func()) LeaseOption
func OnExpired ¶
func OnExpired(fn func()) LeaseOption
func OnExtend ¶
func OnExtend(fn func()) LeaseOption
func OnRefresh ¶
func OnRefresh(fn func()) LeaseOption
func OnRenew ¶
func OnRenew(fn func()) LeaseOption
func Once ¶
func Once() LeaseOption
func UseWallTime ¶
func UseWallTime() LeaseOption
func WithLogger ¶
func WithLogger(logger log.Logger) LeaseOption
Click to show internal directories.
Click to hide internal directories.