containers

package
v0.1.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2019 License: MPL-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	Display      string // Friendly Name
	Name         string // container name
	ID           string // container sha/id
	Digest       string // Container Digest
	Image        string
	PodName      string
	Sandbox      string
	Status       containerd.Status // Running state of container
	Pid          uint32
	RestartCount string
	Metrics      *types.Metric
	// contains filtered or unexported fields
}

Container presents information about a container

func (*Container) GetLogChunker

func (c *Container) GetLogChunker() (chunker.Chunker, io.Closer, error)

GetLogChunker returns chunker for container log file

func (*Container) GetLogFile

func (c *Container) GetLogFile() string

GetLogFile returns path to log file, k8s-style

func (*Container) GetProcessStderr

func (c *Container) GetProcessStderr() (string, error)

GetProcessStderr returns process stderr

func (*Container) Kill

func (c *Container) Kill(signal syscall.Signal) error

Kill sends signal to container task

type Inspector

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

Inspector gather information about pods & containers

func NewInspector

func NewInspector(ctx context.Context, namespace string) (*Inspector, error)

NewInspector builds new Inspector instance in specified namespace

func (*Inspector) Close

func (i *Inspector) Close() error

Close frees associated resources

func (*Inspector) Container

func (i *Inspector) Container(id string) (*Container, error)

Container returns info about a single container.

If container is not found, Container returns nil

nolint: gocyclo

func (*Inspector) Images

func (i *Inspector) Images() (map[string]string, error)

Images returns a hash of image digest -> name

func (*Inspector) Pods

func (i *Inspector) Pods() ([]*Pod, error)

Pods collects information about running pods & containers.

nolint: gocyclo

type Pod

type Pod struct {
	Name    string
	Sandbox string

	Containers []*Container
}

Pod presents information about a pod, including a list of containers

Jump to

Keyboard shortcuts

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