daemon

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2020 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AnnotationUserContainerConfig = "k3c.io/user-container-config"
	AnnotationContainerConfig     = "k3c.io/container-config"
	AnnotationCpus                = "k3c.io/cpus"
)
View Source
const (
	AnnotationPodConfig     = "k3c.io/pod-config"
	AnnotationRestartPolicy = "k3c.io/restart-policy"
)

Variables

View Source
var (
	Timeout                    = 2 * time.Second
	DefaultContainerdEndpoint  = "/run/k3c/containerd/containerd.sock"
	DefaultContainerdNamespace = "k3c.io"
	DefaultLogs                = "/var/log/pods"
	DefaultVolumeDir           = "/var/lib/rancher/k3c/volumes"
)

Functions

func Start

func Start(ctx context.Context, stateDir, rootDir string, opts *Opts) error

Types

type Daemon

type Daemon struct {
	*volume.Manager
	// contains filtered or unexported fields
}

func (*Daemon) Attach

func (c *Daemon) Attach(ctx context.Context, name string, opts *v1alpha1.AttachOptions) (*client.StreamResponse, error)

func (*Daemon) Close

func (c *Daemon) Close() error

func (*Daemon) CreateContainer

func (c *Daemon) CreateContainer(ctx context.Context, podID, image string, opts *v1alpha1.ContainerOptions) (string, error)

func (*Daemon) CreatePod

func (c *Daemon) CreatePod(ctx context.Context, name string, opts *v1alpha1.PodOptions) (string, error)

func (*Daemon) Events

func (d *Daemon) Events(ctx context.Context) (<-chan status.Event, error)

func (*Daemon) Exec

func (c *Daemon) Exec(ctx context.Context, containerName string, cmd []string, opts *v1alpha1.ExecOptions) (*client.StreamResponse, error)

func (*Daemon) GetContainer

func (c *Daemon) GetContainer(ctx context.Context, name string) (*v1.Pod, *v1.Container, string, error)

func (*Daemon) GetImage

func (c *Daemon) GetImage(ctx context.Context, image string) (*client.Image, error)

func (*Daemon) ListImages

func (c *Daemon) ListImages(ctx context.Context) (images []client.Image, err error)

func (*Daemon) ListPods

func (c *Daemon) ListPods(ctx context.Context) ([]v1.Pod, error)

func (*Daemon) LogContainer

func (c *Daemon) LogContainer(ctx context.Context, containerID string, opts *v1.PodLogOptions) (<-chan log.Entry, error)

func (*Daemon) PullImage

func (c *Daemon) PullImage(ctx context.Context, image string, authConfig *client.AuthConfig) (string, error)

func (*Daemon) PullProgress

func (c *Daemon) PullProgress(ctx context.Context, image string) (<-chan []status.Info, error)

func (*Daemon) PushImage

func (c *Daemon) PushImage(ctx context.Context, image string, authConfig *client.AuthConfig) error

func (*Daemon) PushProgress

func (c *Daemon) PushProgress(ctx context.Context, image string) (<-chan []status.Info, error)

func (*Daemon) RemoveContainer

func (c *Daemon) RemoveContainer(ctx context.Context, containerID string) error

func (*Daemon) RemoveImage

func (c *Daemon) RemoveImage(ctx context.Context, id string) error

func (*Daemon) StartContainer

func (c *Daemon) StartContainer(ctx context.Context, containerID string) error

func (*Daemon) StopContainer

func (c *Daemon) StopContainer(ctx context.Context, containerID string, timeout int64) error

func (*Daemon) TagImage

func (c *Daemon) TagImage(ctx context.Context, image string, tags ...string) error

type Opts

type Opts = services.Opts

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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