internal

package
v0.1.24 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get added in v0.1.24

func Get(name string) (types.Container, error)

func GetNetwork added in v0.1.24

func GetNetwork(name string) (TDNetwork.Summary, error)

func Inspect added in v0.1.24

func Inspect(DockerID string) (types.ContainerJSON, error)

func InspectNetwork added in v0.1.24

func InspectNetwork(NetworkID string) (TDNetwork.Inspect, error)

Types

type Labels added in v0.1.24

type Labels struct {
	Labels *smaps.Smap
}

func NewLabels added in v0.1.24

func NewLabels(definition map[string]string) *Labels

func (*Labels) Add added in v0.1.24

func (labels *Labels) Add(key string, value string)

func (*Labels) ToMap added in v0.1.24

func (labels *Labels) ToMap() map[string]string

type Network

type Network struct {
	Reference NetworkReference
	Docker    NetworkDocker
}

func NewNetwork

func NewNetwork(network v1.ContainersNetwork) *Network

func (*Network) Connect

func (network *Network) Connect(containerId string) error

func (*Network) Disconnect

func (network *Network) Disconnect(containerId string) error

func (*Network) EndpointExists added in v0.1.24

func (network *Network) EndpointExists(endpointName string) bool

type NetworkDocker

type NetworkDocker struct {
	NetworkId string
	IP        string
}

type NetworkReference

type NetworkReference struct {
	Group string
	Name  string
}

type Networks

type Networks struct {
	Networks []*Network
}

func NewNetworks

func NewNetworks(networks []v1.ContainersNetwork) *Networks

func (*Networks) Add

func (networks *Networks) Add(network v1.ContainersNetwork)

func (*Networks) Find

func (networks *Networks) Find(networkId string) *Network

func (*Networks) Remove

func (networks *Networks) Remove(containerId string, networkId string) error

type Port

type Port struct {
	Container string
	Host      string
}

func NewPort

func NewPort(port v1.ContainersPort) *Port

type Ports

type Ports struct {
	Ports []*Port
}

func NewPorts

func NewPorts(ports []v1.ContainersPort) *Ports

func (*Ports) Add

func (ports *Ports) Add(port v1.ContainersPort)

func (*Ports) ToPortExposed

func (ports *Ports) ToPortExposed() nat.PortSet

func (*Ports) ToPortMap

func (ports *Ports) ToPortMap() nat.PortMap

type Readiness

type Readiness struct {
	Reference ReadinessReference
	Docker    ReadinessDocker
}

func NewReadiness

func NewReadiness(readiness v1.ContainersReadiness) *Readiness

type ReadinessDocker

type ReadinessDocker struct {
	Name       string
	Operator   string
	Timeout    string
	Body       map[string]string
	Solved     bool
	BodyUnpack map[string]string  `json:"-"`
	Function   func() error       `json:"-"`
	Ctx        context.Context    `json:"-"`
	Cancel     context.CancelFunc `json:"-"`
}

type ReadinessReference

type ReadinessReference struct {
	Group      string
	Name       string
	Key        string
	MountPoint string
	Data       map[string]string
}

type Readinesses

type Readinesses struct {
	Readinesses []*Readiness
}

func NewReadinesses

func NewReadinesses(readinesses []v1.ContainersReadiness) *Readinesses

func (*Readinesses) Add

func (Readinesses *Readinesses) Add(Readiness v1.ContainersReadiness)

type Resource

type Resource struct {
	Reference ResourceReference
	Docker    ResourceDocker
}

func NewResource

func NewResource(resource v1.ContainersResource) *Resource

type ResourceDocker

type ResourceDocker struct {
	Data *smaps.Smap
}

type ResourceReference

type ResourceReference struct {
	Group      string
	Name       string
	Key        string
	MountPoint string
}

type Resources

type Resources struct {
	Resources []*Resource
}

func NewResources

func NewResources(resources []v1.ContainersResource) *Resources

func (*Resources) Add

func (resources *Resources) Add(resource v1.ContainersResource)

type Volume

type Volume struct {
	Type       mount.Type
	Name       string
	HostPath   string
	MountPoint string
}

func NewVolume

func NewVolume(volume v1.ContainersVolume) *Volume

type Volumes

type Volumes struct {
	Volumes []*Volume
	Lock    sync.RWMutex
}

func NewVolumes

func NewVolumes(volumes []v1.ContainersVolume) (*Volumes, error)

func (*Volumes) Add

func (volumes *Volumes) Add(volume v1.ContainersVolume) error

func (*Volumes) RemoveResources

func (volumes *Volumes) RemoveResources() error

func (*Volumes) ToMounts

func (volumes *Volumes) ToMounts() []mount.Mount

Jump to

Keyboard shortcuts

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