client

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: Apache-2.0, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeLock

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

func (*NodeLock) Expiry

func (nl *NodeLock) Expiry() time.Time

func (*NodeLock) Renew

func (nl *NodeLock) Renew(ctx context.Context) (bool, error)

type NodeLocker

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

func NewNodeLocker

func NewNodeLocker(ctx context.Context, endpoint string) (*NodeLocker, error)

func (*NodeLocker) Close

func (nl *NodeLocker) Close()

func (*NodeLocker) Lock

func (nl *NodeLocker) Lock(ctx context.Context, peerID string) (*NodeLock, bool, error)

func (*NodeLocker) LockedPeers

func (nl *NodeLocker) LockedPeers(ctx context.Context) ([]string, error)

type NodeLockerConn

type NodeLockerConn interface {
	FetchLocks(context.Context) ([]nodelocker.NodeLock, error)
	Lock(context.Context, string, string) (nodelocker.NodeLock, error)
}

Jump to

Keyboard shortcuts

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