containers

package
v0.1.8-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SymlinksAndFiles

func SymlinksAndFiles(path string) ([]string, []string, error)

func Tree

func Tree(path string) ([]string, error)

Types

type ConfigSection

type ConfigSection struct {
	Labels map[string]string
}

ConfigSection represents Config section of container configuration

type Container

type Container struct {
	Type string `json:"-"`

	ID      string        `json:"ID"`
	LogPath string        `json:"LogPath"`
	State   StateSection  `json:"State"`
	Config  ConfigSection `json:"Config"`
}

Container represents container configuration

func (*Container) GetName

func (c *Container) GetName() string

GetName returns container name or empty string

func (*Container) GetPodName

func (c *Container) GetPodName() string

GetPodName returns container pod name or empty string

func (*Container) GetPodNamespace

func (c *Container) GetPodNamespace() string

GetPodNamespace returns container pod namespace or empty string

func (*Container) Running

func (c *Container) Running() bool

Running returns value of corresponding field of the container config

type Containers

type Containers map[string]*Container

Containers is the map of container entities

func (Containers) Present

func (containers Containers) Present(path string) bool

Present checks whether the key present in containers map

type ProviderContainers

type ProviderContainers struct {
	sync.Mutex
	// contains filtered or unexported fields
}

ProviderContainers seeks for logs in requested logPath and resolves links

func NewProviderContainers

func NewProviderContainers(path string, logger logging.Logger) (*ProviderContainers, error)

NewProviderContainers is ProviderContainers constructor

func (*ProviderContainers) Containers

func (provider *ProviderContainers) Containers() (Containers, error)

Containers seek and return all Containers

type StateSection

type StateSection struct {
	Running bool
}

StateSection represents State section of container configuration

Jump to

Keyboard shortcuts

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