internal

package
v0.0.87 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNetworkId

func GetNetworkId(name string) string

Types

type Network

type Network struct {
	Reference NetworkReference
	Docker    NetworkDocker
}

func NewNetwork

func NewNetwork(network v1.ContainerNetwork) *Network

func (*Network) Connect

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

func (*Network) Disconnect

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

func (*Network) FindNetworkAlias

func (network *Network) FindNetworkAlias(endpointName string) error

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
	Lock     sync.RWMutex
}

func NewNetworks

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

func (*Networks) Add

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

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.ContainerPort) *Port

type Ports

type Ports struct {
	Ports []*Port
}

func NewPorts

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

func (*Ports) Add

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

func (*Ports) ToPortExposed

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

func (*Ports) ToPortMap

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

type Readiness

type Readiness struct {
	Reference ReadinessReference
	Docker    ReadinessDocker
}

func NewReadiness

func NewReadiness(readiness v1.ContainerReadiness) *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.ContainerReadiness) *Readinesses

func (*Readinesses) Add

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

type Resource

type Resource struct {
	Reference ResourceReference
	Docker    ResourceDocker
}

func NewResource

func NewResource(resource v1.ContainerResource) *Resource

type ResourceDocker

type ResourceDocker struct {
	Data map[string]string
}

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.ContainerResource) *Resources

func (*Resources) Add

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

type Volume

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

func NewVolume

func NewVolume(volume v1.ContainerVolume) *Volume

type Volumes

type Volumes struct {
	Volumes     []*Volume
	HomeDir     string
	HostHomeDir string
}

func NewVolumes

func NewVolumes(volumes []v1.ContainerVolume, config *configuration.Configuration) (*Volumes, error)

func (*Volumes) Add

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

func (*Volumes) RemoveResources

func (volumes *Volumes) RemoveResources() error

func (*Volumes) ToMounts

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

Jump to

Keyboard shortcuts

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