registry

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 License: NCSA Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Locker

type Locker struct {
	// Client used to connect to the registry server
	Client registry.Store

	// ConnectionName is an optional field which may contain a human-readable
	// description for the connection. It is only used for composing error
	// messages and can be used to match them to a specific registry instance.
	ConnectionName string
	// contains filtered or unexported fields
}

func New

func New(client registry.Store) *Locker

New constructs a new locker using the provided client.

func (*Locker) Init

func (locker *Locker) Init() error

func (*Locker) Lock

func (locker *Locker) Lock(id string) error

LockUpload tries to obtain the exclusive lock.

func (*Locker) Name

func (locker *Locker) Name() string

func (*Locker) Unlock

func (locker *Locker) Unlock(id string) error

UnlockUpload releases a lock. If no such lock exists, no error will be returned.

Jump to

Keyboard shortcuts

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