leaseutil

package
v0.18.2 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 6 Imported by: 267

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeTemporary added in v0.7.0

func MakeTemporary(l *leases.Lease) error

func WithLease

func WithLease(ctx context.Context, ls leases.Manager, opts ...leases.Opt) (context.Context, func(context.Context) error, error)

Types

type LeaseRef added in v0.13.0

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

func NewLease added in v0.13.0

func NewLease(ctx context.Context, lm leases.Manager, opts ...leases.Opt) (*LeaseRef, context.Context, error)

func (*LeaseRef) Adopt added in v0.13.0

func (l *LeaseRef) Adopt(ctx context.Context) error

func (*LeaseRef) Discard added in v0.13.0

func (l *LeaseRef) Discard() error

type Manager added in v0.12.0

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

func WithNamespace

func WithNamespace(lm leases.Manager, ns string) *Manager

func (*Manager) AddResource added in v0.12.0

func (l *Manager) AddResource(ctx context.Context, lease leases.Lease, resource leases.Resource) error

func (*Manager) Create added in v0.12.0

func (l *Manager) Create(ctx context.Context, opts ...leases.Opt) (leases.Lease, error)

func (*Manager) Delete added in v0.12.0

func (l *Manager) Delete(ctx context.Context, lease leases.Lease, opts ...leases.DeleteOpt) error

func (*Manager) DeleteResource added in v0.12.0

func (l *Manager) DeleteResource(ctx context.Context, lease leases.Lease, resource leases.Resource) error

func (*Manager) List added in v0.12.0

func (l *Manager) List(ctx context.Context, filters ...string) ([]leases.Lease, error)

func (*Manager) ListResources added in v0.12.0

func (l *Manager) ListResources(ctx context.Context, lease leases.Lease) ([]leases.Resource, error)

func (*Manager) Namespace added in v0.12.0

func (l *Manager) Namespace() string

func (*Manager) WithNamespace added in v0.12.0

func (l *Manager) WithNamespace(ns string) *Manager

Jump to

Keyboard shortcuts

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