container

package
v0.2.0-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDockerEventStream

func NewDockerEventStream() (*stream.Stream, error)

NewDockerEventStream creates a new event stream of Docker container lifecycle events.

func NewEventStream

func NewEventStream() (*stream.Stream, error)

NewEventStream creates a new stream of container lifecycle events.

func NewOciEventStream

func NewOciEventStream() (*stream.Stream, error)

NewOciEventStream creates a new event stream of OCI container lifecycle events.

Types

type DockerConfigConfig

type DockerConfigConfig struct {
	Hostname   string `json:"Hostname"`
	Domainname string `json:"Domainname"`
	User       string `json:"User"`

	// XXX: ...
	Image string `json:"Image"`
}

type DockerConfigState

type DockerConfigState struct {
	Running           bool      `json:"Running"`
	Paused            bool      `json:"Paused"`
	Restarting        bool      `json:"Restarting"`
	OOMKilled         bool      `json:"OOMKilled"`
	RemovalInProgress bool      `json:"RemovalInProgress"`
	Dead              bool      `json:"Dead"`
	Pid               int       `json:"Pid"`
	StartedAt         time.Time `json:"StartedAt"`
	FinishedAt        time.Time `json:"FinishedAt"`
	Health            string    `json:"Health"`
	ExitCode          int       `json:"ExitCode"`
}

type DockerConfigV2

type DockerConfigV2 struct {
	// XXX: Fill in as needed...
	ID     string             `json:"ID"`
	Image  string             `json:"Image"`
	State  DockerConfigState  `json:"State"`
	Path   string             `json:"Path"`
	Config DockerConfigConfig `json:"Config"`
	// ...
	Name string `json:"Name"`
}

type Event

type Event struct {
	ID    string
	Name  string
	State State

	ImageID string
	Image   string
	Pid     uint32
	Cgroup  string

	DockerConfig string
	OciConfig    string

	ExitCode int32
}

Event represents a container lifecycle event containing fields common to all supported container runtimes.

type Info

type Info struct {
	ID        string
	Name      string
	ImageID   string
	ImageName string
}

Info describes a created, running or stopped container on the Node

func GetInfo

func GetInfo(containerID string) *Info

GetInfo returns cached container information for the container with the given ID or nil if none was found.

type State

type State uint

State represents the state of a container instance

const (
	ContainerCreated State
	ContainerStarted
	ContainerStopped
	ContainerRemoved
)

Possible states for a container instance

Directories

Path Synopsis
Package c8dockerclient is a homegrown HTTP Docker API client.
Package c8dockerclient is a homegrown HTTP Docker API client.

Jump to

Keyboard shortcuts

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