containers

package
v1.202405300917.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 9 Imported by: 0

README

codecov

QName

Container names system view

Documentation

Index

Constants

View Source
const MaxAvailableContainerID = 0xFFFF

maximum Container ID value

Variables

View Source
var ErrContainerIDNotFound = errors.New("container ID not found")
View Source
var ErrContainerIDsExceeds = fmt.Errorf("the maximum number of container identifiers (%d) has been exceeded", MaxAvailableContainerID)
View Source
var ErrContainerNotFound = errors.New("container not found")
View Source
var ErrWrongContainerID = errors.New("wrong container ID")

Functions

This section is empty.

Types

type ContainerID

type ContainerID uint16

Identifier for Container name

const (
	NullContainerID ContainerID = 0 + iota

	ContainerNameIDSysLast ContainerID = 63
)

constants for system container names

type Containers

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

Container IDs system view

Use ID() to obtain container ID by its name.
Use Container() to obtain container name by its ID.
Use Prepare() to load container IDs from storage.

func New

func New() *Containers

Constructs and return new containers system view

func (*Containers) Container

func (cnt *Containers) Container(id ContainerID) (name string, err error)

Retrieve container for specified ID

func (*Containers) ID

func (cnt *Containers) ID(name string) (ContainerID, error)

Retrieve ID for specified container

func (*Containers) Prepare

func (cnt *Containers) Prepare(storage istorage.IAppStorage, versions *vers.Versions, appDef appdef.IAppDef) (err error)

Loads all container from storage, add all known system and application containers and store if some changes. Must be called at application starts

Jump to

Keyboard shortcuts

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