daemon

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2020 License: Apache-2.0 Imports: 84 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 (
	Config             = config.DefaultK3Config()
	PluginRegistration = plugin.Registration{
		ID:     "k3c",
		Type:   plugin.GRPCPlugin,
		Config: Config,
		Requires: []plugin.Type{
			plugin.InternalPlugin,
			plugin.ServicePlugin,
		},
		InitFn: PluginInitFunc,
	}
)

Functions

func PluginInitFunc added in v0.2.0

func PluginInitFunc(ic *plugin.InitContext) (interface{}, error)

Types

type Daemon

type Daemon struct {
	// 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) CreateVolume added in v0.2.0

func (c *Daemon) CreateVolume(ctx context.Context, name string) (*client.Volume, 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) ListVolumes added in v0.2.0

func (c *Daemon) ListVolumes(ctx context.Context) ([]client.Volume, 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) RemoveVolume added in v0.2.0

func (c *Daemon) RemoveVolume(ctx context.Context, name string, force bool) 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

Directories

Path Synopsis
services

Jump to

Keyboard shortcuts

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