Documentation ¶ Overview ¶ Package mem implements lease.Provider in memory. Index ¶ type Provider func New() *Provider func (p *Provider) Acquire(ctx context.Context, name string, exp time.Time) (string, error) func (p *Provider) Release(_ context.Context, name, secret string) error func (p *Provider) Renew(ctx context.Context, name, secret string, exp time.Time) error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Provider ¶ type Provider struct { lease.Clock // contains filtered or unexported fields } Provider is a lease.Provider implemented in memory. func New ¶ func New() *Provider New creates a new in-memory lease provider. func (*Provider) Acquire ¶ func (p *Provider) Acquire(ctx context.Context, name string, exp time.Time) (string, error) func (*Provider) Release ¶ func (p *Provider) Release(_ context.Context, name, secret string) error func (*Provider) Renew ¶ func (p *Provider) Renew(ctx context.Context, name, secret string, exp time.Time) error Source Files ¶ View all Source files mem.go Click to show internal directories. Click to hide internal directories.