runtime

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2017 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContainerNameLabel = "io.rancher.container.name"
	PullImageLabels    = "io.rancher.container.pull_image"
	UUIDLabel          = "io.rancher.container.uuid"
	AgentIDLabel       = "io.rancher.container.agent_id"
)
View Source
const (
	Create       = "Create"
	Remove       = "Remove"
	Attach       = "Attach"
	Mount        = "Mount"
	Path         = "Path"
	Unmount      = "Unmount"
	Get          = "Get"
	List         = "List"
	Capabilities = "Capabilities"
)

Variables

View Source
var (
	HTTPProxyList = []string{"http_proxy", "HTTP_PROXY", "https_proxy", "HTTPS_PROXY", "no_proxy", "NO_PROXY"}
)

Functions

func ContainerInspect

func ContainerInspect(inspect InstanceInspect, dockerClient *client.Client) (types.ContainerJSON, error)

func ContainerRemove

func ContainerRemove(containerSpec v3.Container, dockerClient *client.Client) error

func ContainerStart

func ContainerStart(containerSpec v3.Container, volumes []v3.Volume, networkKind string, credentials []v3.Credential, progress *progress.Progress, runtimeClient *client.Client, idsMap map[string]string) error

func ContainerStop

func ContainerStop(containerSpec v3.Container, volumes []v3.Volume, client *client.Client, timeout int) error

func DoInstancePull

func DoInstancePull(params PullParams, progress *progress.Progress, dockerClient *client.Client, credential v3.Credential) (types.ImageInspect, error)

func DoVolumeActivate

func DoVolumeActivate(volume v3.Volume, client *engineCli.Client, progress *progress.Progress) error

func ImagePull

func ImagePull(progress *progress.Progress, client *client.Client, imageName string, credential v3.Credential) error

func IsContainerRemoved

func IsContainerRemoved(containerSpec v3.Container, dockerClient *client.Client) (bool, error)

func IsContainerStarted

func IsContainerStarted(containerSpec v3.Container, client *client.Client) (bool, error)

func IsContainerStopped

func IsContainerStopped(containerSpec v3.Container, client *client.Client) (bool, error)

func IsRancherVolume

func IsRancherVolume(volume v3.Volume) bool

func IsVolumeActive

func IsVolumeActive(volume v3.Volume, dockerClient *engineCli.Client) (bool, error)

func IsVolumeRemoved

func IsVolumeRemoved(volume v3.Volume, client *client.Client) (bool, error)

func VolumeRemove

func VolumeRemove(volume v3.Volume, dockerClient *client.Client, pro *progress.Progress) error

func VolumeRemoveDocker

func VolumeRemoveDocker(volume v3.Volume, dockerClient *client.Client, pro *progress.Progress) error

func VolumeRemoveFlex

func VolumeRemoveFlex(volume v3.Volume) error

Types

type Capability

type Capability struct {
	Scope string
}

Capability represents the list of capabilities a volume driver can return

type InstanceInspect

type InstanceInspect struct {
	Name string `json:"name"`
	Kind string `json:"kind"`
	ID   string `json:"id"`
}

type InstancePull

type InstancePull struct {
	Kind  string `json:"kind"`
	Image struct {
		Data struct {
			DockerImage struct {
				FullName string `json:"fullName"`
				Server   string `json:"server"`
			}
		}
		RegistryCredential RegistryCredential
	}
	Mode     string `json:"mode"`
	Complete bool   `json:"complete"`
	Tag      string `json:"tag"`
}

type PullParams

type PullParams struct {
	Tag       string
	Mode      string
	Complete  bool
	ImageUUID string
}

type RegistryCredential

type RegistryCredential struct {
	PublicValue string
	SecretValue string
	Data        struct {
		Fields struct {
			ServerAddress string
		}
	}
}

type Response

type Response struct {
	Mountpoint   string
	Err          string
	Volumes      []*Volume
	Volume       *Volume
	Capabilities Capability
}

Response is the strucutre that the plugin's responses are serialized to.

type Volume

type Volume struct {
	Name       string
	Mountpoint string
	Status     map[string]interface{}
}

Volume represents a volume object for use with `Get` and `List` requests

Jump to

Keyboard shortcuts

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