registry

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConnectionStatusDisconnected = 0 + iota
	ConnectionStatusConnected
	ConnectionStatusConnectionError
)

Connection status

Variables

View Source
var (
	// ErrConnectionNotSelected implements connection is not seleceted error
	ErrConnectionNotSelected = errors.New("system connection not selected")
)

Functions

func CancelContext

func CancelContext()

CancelContext run the cancel function for context

func ConnectionIdentity

func ConnectionIdentity() string

ConnectionIdentity returns selected connection identity

func ConnectionIsSet

func ConnectionIsSet() bool

ConnectionIsSet returns true if connection is set

func ConnectionName

func ConnectionName() string

ConnectionName returns selected connection name

func ConnectionURI

func ConnectionURI() string

ConnectionURI returns selected connection url

func GetConnection

func GetConnection() (context.Context, error)

GetConnection returns connection to podman socket

func SetConnection

func SetConnection(connection Connection)

SetConnection sets registry connection

func SetConnectionStatus

func SetConnectionStatus(status ConnStatus)

SetConnectionStatus sets registry Connection status

func UnsetConnection

func UnsetConnection()

UnsetConnection unsets the registry loaded connection

Types

type ConnStatus

type ConnStatus int

ConnStatus implements Connection status

func ConnectionStatus

func ConnectionStatus() ConnStatus

ConnectionStatus returns selected connection status

func (ConnStatus) String

func (connStatus ConnStatus) String() string

type Connection

type Connection struct {
	Name     string
	Default  bool
	Status   ConnStatus
	URI      string
	Identity string
}

Connection implements a system connection

Jump to

Keyboard shortcuts

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