mock

package
v5.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lock

type Lock struct {
	mock.Mock
}

Lock is a testify-backed mock of distributedlock.Lock.

func (*Lock) Key

func (m *Lock) Key() string

Key implements distributedlock.Lock.

func (*Lock) Refresh

func (m *Lock) Refresh(ctx context.Context, ttl time.Duration) error

Refresh implements distributedlock.Lock.

func (*Lock) Release

func (m *Lock) Release(ctx context.Context) error

Release implements distributedlock.Lock.

func (*Lock) TTL

func (m *Lock) TTL() time.Duration

TTL implements distributedlock.Lock.

type Locker

type Locker struct {
	mock.Mock
}

Locker is a testify-backed mock of distributedlock.Locker.

func (*Locker) Acquire

func (m *Locker) Acquire(ctx context.Context, key string, ttl time.Duration) (distributedlock.Lock, error)

Acquire implements distributedlock.Locker.

func (*Locker) Close

func (m *Locker) Close() error

Close implements distributedlock.Locker.

func (*Locker) Ping

func (m *Locker) Ping(ctx context.Context) error

Ping implements distributedlock.Locker.

Jump to

Keyboard shortcuts

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