model

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildOptions

type BuildOptions struct {
	Context string
	FileObj string
	Remote  string
	Tag     string
}

type Container

type Container struct {
	AccountID int64 `json:"accountId,omitempty" yaml:"account_id,omitempty"`

	AgentID int64 `json:"agentId,omitempty" yaml:"agent_id,omitempty"`

	AllocationState string `json:"allocationState,omitempty" yaml:"allocation_state,omitempty"`

	BlkioDeviceOptions map[string]interface{} `json:"blkioDeviceOptions,omitempty" yaml:"blkio_device_options,omitempty"`

	CapAdd []string `json:"capAdd,omitempty" yaml:"cap_add,omitempty"`

	CapDrop []string `json:"capDrop,omitempty" yaml:"cap_drop,omitempty"`

	Command []string `json:"command,omitempty" yaml:"command,omitempty"`

	Count int64 `json:"count,omitempty" yaml:"count,omitempty"`

	CPUSet string `json:"cpuSet,omitempty" yaml:"cpu_set,omitempty"`

	CPUShares int64 `json:"cpuShares,omitempty" yaml:"cpu_shares,omitempty"`

	CreateIndex int64 `json:"createIndex,omitempty" yaml:"create_index,omitempty"`

	Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`

	DataVolumeMounts map[string]interface{} `json:"dataVolumeMounts,omitempty" yaml:"data_volume_mounts,omitempty"`

	DataVolumes []string `json:"dataVolumes,omitempty" yaml:"data_volumes,omitempty"`

	DataVolumesFrom []string `json:"dataVolumesFrom,omitempty" yaml:"data_volumes_from,omitempty"`

	DeploymentUnitUUID string `json:"deploymentUnitUuid,omitempty" yaml:"deployment_unit_uuid,omitempty"`

	Description string `json:"description,omitempty" yaml:"description,omitempty"`

	Devices []string `json:"devices,omitempty" yaml:"devices,omitempty"`

	DNS []string `json:"dns,omitempty" yaml:"dns,omitempty"`

	DNSSearch []string `json:"dnsSearch,omitempty" yaml:"dns_search,omitempty"`

	DomainName string `json:"domainName,omitempty" yaml:"domain_name,omitempty"`

	EntryPoint []string `json:"entryPoint,omitempty" yaml:"entry_point,omitempty"`

	Environment map[string]interface{} `json:"environment,omitempty" yaml:"environment,omitempty"`

	Expose []string `json:"expose,omitempty" yaml:"expose,omitempty"`

	ExternalID string `json:"externalId,omitempty" yaml:"external_id,omitempty"`

	ExtraHosts []string `json:"extraHosts,omitempty" yaml:"extra_hosts,omitempty"`

	FirstRunning string `json:"firstRunning,omitempty" yaml:"first_running,omitempty"`

	HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"`

	HostID string `json:"hostId,omitempty" yaml:"host_id,omitempty"`

	Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"`

	ImageUUID string `json:"imageUuid,omitempty" yaml:"image_uuid,omitempty"`

	InstanceLinks map[string]interface{} `json:"instanceLinks,omitempty" yaml:"instance_links,omitempty"`

	Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`

	Labels map[string]interface{} `json:"labels,omitempty" yaml:"labels,omitempty"`

	LxcConf map[string]interface{} `json:"lxcConf,omitempty" yaml:"lxc_conf,omitempty"`

	Memory int64 `json:"memory,omitempty" yaml:"memory,omitempty"`

	MemoryReservation int64 `json:"memoryReservation,omitempty" yaml:"memory_reservation,omitempty"`

	MemorySwap int64 `json:"memorySwap,omitempty" yaml:"memory_swap,omitempty"`

	Name string `json:"name,omitempty" yaml:"name,omitempty"`

	NativeContainer bool `json:"nativeContainer,omitempty" yaml:"native_container,omitempty"`

	NetworkContainerID string `json:"networkContainerId,omitempty" yaml:"network_container_id,omitempty"`

	NetworkIds []string `json:"networkIds,omitempty" yaml:"network_ids,omitempty"`

	NetworkMode string `json:"networkMode,omitempty" yaml:"network_mode,omitempty"`

	PidMode string `json:"pidMode,omitempty" yaml:"pid_mode,omitempty"`

	PrimaryIPAddress string `json:"primaryIpAddress,omitempty" yaml:"primary_ip_address,omitempty"`

	Privileged bool `json:"privileged,omitempty" yaml:"privileged,omitempty"`

	PublishAllPorts bool `json:"publishAllPorts,omitempty" yaml:"publish_all_ports,omitempty"`

	ReadOnly bool `json:"readOnly,omitempty" yaml:"read_only,omitempty"`

	RegistryCredentialID string `json:"registryCredentialId,omitempty" yaml:"registry_credential_id,omitempty"`

	RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`

	Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`

	RequestedHostID string `json:"requestedHostId,omitempty" yaml:"requested_host_id,omitempty"`

	SecurityOpt []string `json:"securityOpt,omitempty" yaml:"security_opt,omitempty"`

	StartCount int64 `json:"startCount,omitempty" yaml:"start_count,omitempty"`

	StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"`

	State string `json:"state,omitempty" yaml:"state,omitempty"`

	StdinOpen bool `json:"stdinOpen,omitempty" yaml:"stdin_open,omitempty"`

	SystemContainer string `json:"systemContainer,omitempty" yaml:"system_container,omitempty"`

	Token string `json:"token,omitempty" yaml:"token,omitempty"`

	Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`

	TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`

	TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`

	Tty bool `json:"tty,omitempty" yaml:"tty,omitempty"`

	User string `json:"user,omitempty" yaml:"user,omitempty"`

	UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"`

	Version string `json:"version,omitempty" yaml:"version,omitempty"`

	VolumeDriver string `json:"volumeDriver,omitempty" yaml:"volume_driver,omitempty"`

	WorkingDir string `json:"workingDir,omitempty" yaml:"working_dir,omitempty"`
}

type ContainerJSON

type ContainerJSON struct {
	ID              string `json:"Id"`
	Created         string
	Path            string
	Args            []string
	State           types.ContainerState
	Image           string
	ResolvConfPath  string
	HostnamePath    string
	HostsPath       string
	LogPath         string
	Node            types.ContainerNode `json:",omitempty"`
	Name            string
	RestartCount    int
	Driver          string
	MountLabel      string
	ProcessLabel    string
	AppArmorProfile string
	ExecIDs         []string
	HostConfig      HostConfig
	GraphDriver     types.GraphDriverData
	SizeRw          int64 `json:",omitempty"`
	SizeRootFs      int64 `json:",omitempty"`
	Mounts          []types.MountPoint
	Config          container.Config
	NetworkSettings types.NetworkSettings
}

type ContainerNotFoundError

type ContainerNotFoundError struct {
}

func (ContainerNotFoundError) Error

func (c ContainerNotFoundError) Error() string

type CredentialData

type CredentialData struct {
	Fields CredentialFields
}

type CredentialFields

type CredentialFields struct {
	ServerAddress string
	Email         string
}

type DeviceOptions

type DeviceOptions struct {
	Weight    uint16
	ReadIops  uint64
	WriteIops uint64
	ReadBps   uint64
	WriteBps  uint64
}

type DockerImage

type DockerImage struct {
	FullName      string `json:"fullName"`
	ID            string `json:"id"`
	Namespace     string `json:"namespace"`
	QualifiedName string `json:"qualifiedName"`
	Repository    string `json:"repository"`
	Tag           string `json:"tag"`
}

type Event

type Event struct {
	Data          map[string]interface{}
	ID            string      `json:"id"`
	Name          string      `json:"name"`
	PreviousIds   interface{} `json:"previousIds"`
	PreviousNames interface{} `json:"previousNames"`
	Publisher     interface{} `json:"publisher"`
	ReplyTo       string      `json:"replyTo"`
	ResourceID    string      `json:"resourceId"`
	ResourceType  string      `json:"resourceType"`
	Time          int64       `json:"time"`
}

type Host

type Host struct {
	AgentID     int   `json:"agentId"`
	Created     int64 `json:"created"`
	Data        map[string]interface{}
	Description interface{} `json:"description"`
	ID          int         `json:"id"`
	Kind        string      `json:"kind"`
	Name        interface{} `json:"name"`
	Removed     interface{} `json:"removed"`
	State       string      `json:"state"`
	Type        string      `json:"type"`
	UUID        string      `json:"uuid"`
}

type HostBind

type HostBind struct {
	BindAddr   string
	PublicPort int
}

type HostConfig

type HostConfig struct {
	// Applicable to all platforms
	Binds           []string                // List of volume bindings for this container
	ContainerIDFile string                  // File (path) where the containerId is written
	LogConfig       LogConfig               // Configuration of the logs for this container
	NetworkMode     container.NetworkMode   // Network mode to use for the container
	PortBindings    nat.PortMap             // Port mapping between the exposed port (container) and the host
	RestartPolicy   container.RestartPolicy // Restart policy to be used for the container
	AutoRemove      bool                    // Automatically remove container when it exits
	VolumeDriver    string                  // Name of the volume driver used to mount volumes
	VolumesFrom     []string                // List of volumes to take from other container

	// Applicable to UNIX platforms
	CapAdd          strslice.StrSlice    // List of kernel capabilities to add to the container
	CapDrop         strslice.StrSlice    // List of kernel capabilities to remove from the container
	DNS             []string             `json:"Dns"`        // List of DNS server to lookup
	DNSOptions      []string             `json:"DnsOptions"` // List of DNSOption to look for
	DNSSearch       []string             `json:"DnsSearch"`  // List of DNSSearch to look for
	ExtraHosts      []string             // List of extra hosts
	GroupAdd        []string             // List of additional groups that the container process will run as
	IpcMode         container.IpcMode    // IPC namespace to use for the container
	Cgroup          container.CgroupSpec // Cgroup to use for the container
	Links           []string             // List of links (in the name:alias form)
	OomScoreAdj     int                  // Container preference for OOM-killing
	PidMode         container.PidMode    // PID namespace to use for the container
	Privileged      bool                 // Is the container in privileged mode
	PublishAllPorts bool                 // Should docker publish all exposed port for the container
	ReadonlyRootfs  bool                 // Is the container root filesystem in read-only
	SecurityOpt     []string             // List of string values to customize labels for MLS systems, such as SELinux.
	StorageOpt      map[string]string    `json:",omitempty"` // Storage driver options per container.
	Tmpfs           map[string]string    `json:",omitempty"` // List of tmpfs (mounts) used for the container
	UTSMode         container.UTSMode    // UTS namespace to use for the container
	UsernsMode      container.UsernsMode // The user namespace to use for the container
	ShmSize         int64                // Total shm memory usage
	Sysctls         map[string]string    `json:",omitempty"` // List of Namespaced sysctls used for the container
	Runtime         string               `json:",omitempty"` // Runtime to use with this container

	// Applicable to Windows
	//ConsoleSize [2]int    // Initial console size
	Isolation container.Isolation // Isolation technology of the container (eg default, hyperv)

	// Contains container's resources (cgroups, ulimits)
	Resources

	// Mounts specs used by the container
	Mounts []mount.Mount `json:",omitempty"`
}

type Image

type Image struct {
	AccountID          int                `json:"accountId"`
	Checksum           interface{}        `json:"checksum"`
	Created            int64              `json:"created"`
	Data               ImageData          `json:"data"`
	Description        interface{}        `json:"description"`
	ID                 int                `json:"id"`
	IsPublic           bool               `json:"isPublic"`
	Name               string             `json:"name"`
	PhysicalSizeBytes  interface{}        `json:"physicalSizeBytes"`
	Prepopulate        bool               `json:"prepopulate"`
	PrepopulateStamp   string             `json:"prepopulateStamp"`
	RemoveTime         interface{}        `json:"removeTime"`
	Removed            interface{}        `json:"removed"`
	State              string             `json:"state"`
	Type               string             `json:"type"`
	URL                interface{}        `json:"url"`
	UUID               string             `json:"uuid"`
	VirtualSizeBytes   interface{}        `json:"virtualSizeBytes"`
	RegistryCredential RegistryCredential `json:"registryCredential"`
	ProcessData        map[string]interface{}
}

type ImageData

type ImageData struct {
	Fields      ImageFields
	DockerImage DockerImage
	ProcessData ProcessData
}

type ImageFields

type ImageFields struct {
	Build BuildOptions
}

type ImageParams

type ImageParams struct {
	Image     Image
	Tag       string
	Mode      string
	Complete  bool
	ImageUUID string
}

type ImageStoragePoolMap

type ImageStoragePoolMap struct {
	Created       int64 `json:"created"`
	ID            int   `json:"id"`
	Image         Image
	ImageID       int         `json:"imageId"`
	RemoveLocked  bool        `json:"removeLocked"`
	RemoveTime    interface{} `json:"removeTime"`
	Removed       interface{} `json:"removed"`
	State         string      `json:"state"`
	StoragePool   StoragePool
	StoragePoolID int         `json:"storagePoolId"`
	Type          string      `json:"type"`
	URI           interface{} `json:"uri"`
}

type InfoData

type InfoData struct {
	Info    types.Info
	Version types.Version
}

type Instance

type Instance struct {
	AccountID                   int    `json:"accountId"`
	AllocationState             string `json:"allocationState"`
	Created                     int64  `json:"created"`
	Data                        InstanceFieldsData
	Ports                       []Port
	Description                 string `json:"description"`
	Hostname                    string `json:"hostname"`
	ID                          int    `json:"id"`
	Image                       Image
	ImageID                     int    `json:"imageId"`
	Kind                        string `json:"kind"`
	Name                        string `json:"name"`
	Nics                        []Nic
	Offering                    interface{} `json:"offering"`
	OfferingID                  interface{} `json:"offeringId"`
	OnCrash                     string      `json:"onCrash"`
	PostComputeState            string      `json:"postComputeState"`
	RemoveTime                  interface{} `json:"removeTime"`
	Removed                     interface{} `json:"removed"`
	RequestedOfferingID         interface{} `json:"requestedOfferingId"`
	RequestedState              interface{} `json:"requestedState"`
	State                       string      `json:"state"`
	Type                        string      `json:"type"`
	UUID                        string      `json:"uuid"`
	Volumes                     []Volume
	ZoneID                      int    `json:"zoneId"`
	ExternalID                  string `json:"externalId"`
	AgentID                     int
	InstanceLinks               []Link
	NetworkContainer            *Instance
	NativeContainer             bool
	SystemContainer             string
	DataVolumesFromContainers   []*Instance
	CommandArgs                 []string
	Labels                      map[string]interface{}
	ProcessData                 ProcessData
	VolumesFromDataVolumeMounts []Volume
	Token                       string
	MilliCPUReservation         int64
	MemoryReservation           int64
}

type InstanceData

type InstanceData struct {
	Name                  string      `json:"name"`
	ID                    int         `json:"id"`
	State                 string      `json:"state"`
	AccountID             int         `json:"accountId"`
	AgentID               int         `json:"agentId"`
	ZoneID                int         `json:"zoneId"`
	InstanceTriggeredStop string      `json:"instanceTriggeredStop"`
	RegistryCredentialID  interface{} `json:"registryCredentialId"`
	ImageID               int         `json:"imageId"`
	HealthState           interface{} `json:"healthState"`
	CreateIndex           interface{} `json:"createIndex"`
	Domain                interface{} `json:"domain"`
	Hostname              interface{} `json:"hostname"`
	Created               int64       `json:"created"`
	ExternalID            string      `json:"externalId"`
	Kind                  string      `json:"kind"`
	UUID                  string      `json:"uuid"`
	HealthUpdated         interface{} `json:"healthUpdated"`
	OfferingID            interface{} `json:"offeringId"`
	DeploymentUnitUUID    interface{} `json:"deploymentUnitUuid"`
	FirstRunning          int64       `json:"firstRunning"`
	Description           interface{} `json:"description"`
	Data                  struct {
		Fields struct {
			ImageUUID        string        `json:"imageUuid"`
			NetworkIds       []interface{} `json:"networkIds"`
			VnetIds          []int         `json:"vnetIds"`
			DataVolumes      []string      `json:"dataVolumes"`
			Privileged       bool          `json:"privileged"`
			DataVolumeMounts struct {
			} `json:"dataVolumeMounts"`
			TransitioningProgress int      `json:"transitioningProgress"`
			HostID                int      `json:"hostId"`
			DockerHostIP          string   `json:"dockerHostIp"`
			DockerIP              string   `json:"dockerIp"`
			DockerPorts           []string `json:"dockerPorts"`
			Labels                struct {
				IoRancherContainerSystem  string `json:"io.rancher.container.system"`
				IoRancherContainerUUID    string `json:"io.rancher.container.uuid"`
				IoRancherContainerName    string `json:"io.rancher.container.name"`
				IoRancherContainerAgentID string `json:"io.rancher.container.agent_id"`
				IoRancherContainerIP      string `json:"io.rancher.container.ip"`
			} `json:"labels"`
			PrimaryIPAddress     string `json:"primaryIpAddress"`
			TransitioningMessage string `json:"transitioningMessage"`
		} `json:"fields"`
		Ipsec struct {
			Num1 struct {
				Isakmp int `json:"isakmp"`
				Nat    int `json:"nat"`
			} `json:"1"`
		} `json:"ipsec"`
		DockerContainer struct {
			ID      string   `json:"Id"`
			Names   []string `json:"Names"`
			Image   string   `json:"Image"`
			ImageID string   `json:"ImageID"`
			Command string   `json:"Command"`
			Created int      `json:"Created"`
			Ports   []struct {
				IP          string `json:"IP"`
				PrivatePort int    `json:"PrivatePort"`
				PublicPort  int    `json:"PublicPort"`
				Type        string `json:"Type"`
			} `json:"Ports"`
			Labels struct {
				IoRancherContainerAgentID string `json:"io.rancher.container.agent_id"`
				IoRancherContainerIP      string `json:"io.rancher.container.ip"`
				IoRancherContainerName    string `json:"io.rancher.container.name"`
				IoRancherContainerSystem  string `json:"io.rancher.container.system"`
				IoRancherContainerUUID    string `json:"io.rancher.container.uuid"`
			} `json:"Labels"`
			State      string `json:"State"`
			Status     string `json:"Status"`
			HostConfig struct {
				NetworkMode string `json:"NetworkMode"`
			} `json:"HostConfig"`
			NetworkSettings struct {
				Networks struct {
					Bridge struct {
						IPAMConfig          interface{} `json:"IPAMConfig"`
						Links               interface{} `json:"Links"`
						Aliases             interface{} `json:"Aliases"`
						NetworkID           string      `json:"NetworkID"`
						EndpointID          string      `json:"EndpointID"`
						Gateway             string      `json:"Gateway"`
						IPAddress           string      `json:"IPAddress"`
						IPPrefixLen         int         `json:"IPPrefixLen"`
						IPv6Gateway         string      `json:"IPv6Gateway"`
						GlobalIPv6Address   string      `json:"GlobalIPv6Address"`
						GlobalIPv6PrefixLen int         `json:"GlobalIPv6PrefixLen"`
						MacAddress          string      `json:"MacAddress"`
					} `json:"bridge"`
				} `json:"Networks"`
			} `json:"NetworkSettings"`
			Mounts interface{} `json:"Mounts"`
		} `json:"dockerContainer"`
		DockerInspect struct {
			ID      string    `json:"Id"`
			Created time.Time `json:"Created"`
			Path    string    `json:"Path"`
			Args    []string  `json:"Args"`
			State   struct {
				Status     string    `json:"Status"`
				Running    bool      `json:"Running"`
				Paused     bool      `json:"Paused"`
				Restarting bool      `json:"Restarting"`
				OOMKilled  bool      `json:"OOMKilled"`
				Dead       bool      `json:"Dead"`
				Pid        int       `json:"Pid"`
				ExitCode   int       `json:"ExitCode"`
				Error      string    `json:"Error"`
				StartedAt  time.Time `json:"StartedAt"`
				FinishedAt time.Time `json:"FinishedAt"`
			} `json:"State"`
			Image           string      `json:"Image"`
			ResolvConfPath  string      `json:"ResolvConfPath"`
			HostnamePath    string      `json:"HostnamePath"`
			HostsPath       string      `json:"HostsPath"`
			LogPath         string      `json:"LogPath"`
			Name            string      `json:"Name"`
			RestartCount    int         `json:"RestartCount"`
			Driver          string      `json:"Driver"`
			MountLabel      string      `json:"MountLabel"`
			ProcessLabel    string      `json:"ProcessLabel"`
			AppArmorProfile string      `json:"AppArmorProfile"`
			ExecIDs         interface{} `json:"ExecIDs"`
			HostConfig      struct {
				Binds           []string `json:"Binds"`
				ContainerIDFile string   `json:"ContainerIDFile"`
				LogConfig       struct {
					Type   string `json:"Type"`
					Config struct {
					} `json:"Config"`
				} `json:"LogConfig"`
				NetworkMode  string `json:"NetworkMode"`
				PortBindings struct {
					Four500UDP []struct {
						HostIP   string `json:"HostIp"`
						HostPort string `json:"HostPort"`
					} `json:"4500/udp"`
					Five00UDP []struct {
						HostIP   string `json:"HostIp"`
						HostPort string `json:"HostPort"`
					} `json:"500/udp"`
				} `json:"PortBindings"`
				RestartPolicy struct {
					Name              string `json:"Name"`
					MaximumRetryCount int    `json:"MaximumRetryCount"`
				} `json:"RestartPolicy"`
				AutoRemove           bool        `json:"AutoRemove"`
				VolumeDriver         string      `json:"VolumeDriver"`
				VolumesFrom          interface{} `json:"VolumesFrom"`
				CapAdd               interface{} `json:"CapAdd"`
				CapDrop              interface{} `json:"CapDrop"`
				DNS                  interface{} `json:"Dns"`
				DNSOptions           interface{} `json:"DnsOptions"`
				DNSSearch            interface{} `json:"DnsSearch"`
				ExtraHosts           interface{} `json:"ExtraHosts"`
				GroupAdd             interface{} `json:"GroupAdd"`
				IpcMode              string      `json:"IpcMode"`
				Cgroup               string      `json:"Cgroup"`
				Links                interface{} `json:"Links"`
				OomScoreAdj          int         `json:"OomScoreAdj"`
				PidMode              string      `json:"PidMode"`
				Privileged           bool        `json:"Privileged"`
				PublishAllPorts      bool        `json:"PublishAllPorts"`
				ReadonlyRootfs       bool        `json:"ReadonlyRootfs"`
				SecurityOpt          interface{} `json:"SecurityOpt"`
				UTSMode              string      `json:"UTSMode"`
				UsernsMode           string      `json:"UsernsMode"`
				ShmSize              int         `json:"ShmSize"`
				ConsoleSize          []int       `json:"ConsoleSize"`
				Isolation            string      `json:"Isolation"`
				CPUShares            int         `json:"CpuShares"`
				Memory               int         `json:"Memory"`
				CgroupParent         string      `json:"CgroupParent"`
				BlkioWeight          int         `json:"BlkioWeight"`
				BlkioWeightDevice    interface{} `json:"BlkioWeightDevice"`
				BlkioDeviceReadBps   interface{} `json:"BlkioDeviceReadBps"`
				BlkioDeviceWriteBps  interface{} `json:"BlkioDeviceWriteBps"`
				BlkioDeviceReadIOps  interface{} `json:"BlkioDeviceReadIOps"`
				BlkioDeviceWriteIOps interface{} `json:"BlkioDeviceWriteIOps"`
				CPUPeriod            int         `json:"CpuPeriod"`
				CPUQuota             int         `json:"CpuQuota"`
				CpusetCpus           string      `json:"CpusetCpus"`
				CpusetMems           string      `json:"CpusetMems"`
				Devices              interface{} `json:"Devices"`
				DiskQuota            int         `json:"DiskQuota"`
				KernelMemory         int         `json:"KernelMemory"`
				MemoryReservation    int         `json:"MemoryReservation"`
				MemorySwap           int         `json:"MemorySwap"`
				MemorySwappiness     int         `json:"MemorySwappiness"`
				OomKillDisable       bool        `json:"OomKillDisable"`
				PidsLimit            int         `json:"PidsLimit"`
				Ulimits              interface{} `json:"Ulimits"`
				CPUCount             int         `json:"CpuCount"`
				CPUPercent           int         `json:"CpuPercent"`
				IOMaximumIOps        int         `json:"IOMaximumIOps"`
				IOMaximumBandwidth   int         `json:"IOMaximumBandwidth"`
			} `json:"HostConfig"`
			GraphDriver struct {
				Name string      `json:"Name"`
				Data interface{} `json:"Data"`
			} `json:"GraphDriver"`
			Mounts []struct {
				Source      string `json:"Source"`
				Destination string `json:"Destination"`
				Mode        string `json:"Mode"`
				RW          bool   `json:"RW"`
				Propagation string `json:"Propagation"`
			} `json:"Mounts"`
			Config struct {
				Hostname     string `json:"Hostname"`
				Domainname   string `json:"Domainname"`
				User         string `json:"User"`
				AttachStdin  bool   `json:"AttachStdin"`
				AttachStdout bool   `json:"AttachStdout"`
				AttachStderr bool   `json:"AttachStderr"`
				ExposedPorts struct {
					Four500UDP struct {
					} `json:"4500/udp"`
					Five00UDP struct {
					} `json:"500/udp"`
				} `json:"ExposedPorts"`
				Tty       bool     `json:"Tty"`
				OpenStdin bool     `json:"OpenStdin"`
				StdinOnce bool     `json:"StdinOnce"`
				Env       []string `json:"Env"`
				Cmd       []string `json:"Cmd"`
				Image     string   `json:"Image"`
				Volumes   struct {
					VarLibRancherEtc struct {
					} `json:"/var/lib/rancher/etc"`
				} `json:"Volumes"`
				WorkingDir string      `json:"WorkingDir"`
				Entrypoint interface{} `json:"Entrypoint"`
				MacAddress string      `json:"MacAddress"`
				OnBuild    interface{} `json:"OnBuild"`
				Labels     struct {
					IoRancherContainerAgentID string `json:"io.rancher.container.agent_id"`
					IoRancherContainerIP      string `json:"io.rancher.container.ip"`
					IoRancherContainerName    string `json:"io.rancher.container.name"`
					IoRancherContainerSystem  string `json:"io.rancher.container.system"`
					IoRancherContainerUUID    string `json:"io.rancher.container.uuid"`
				} `json:"Labels"`
			} `json:"Config"`
			NetworkSettings struct {
				Bridge                 string `json:"Bridge"`
				SandboxID              string `json:"SandboxID"`
				HairpinMode            bool   `json:"HairpinMode"`
				LinkLocalIPv6Address   string `json:"LinkLocalIPv6Address"`
				LinkLocalIPv6PrefixLen int    `json:"LinkLocalIPv6PrefixLen"`
				Ports                  struct {
					Four500UDP []struct {
						HostIP   string `json:"HostIp"`
						HostPort string `json:"HostPort"`
					} `json:"4500/udp"`
					Five00UDP []struct {
						HostIP   string `json:"HostIp"`
						HostPort string `json:"HostPort"`
					} `json:"500/udp"`
				} `json:"Ports"`
				SandboxKey             string      `json:"SandboxKey"`
				SecondaryIPAddresses   interface{} `json:"SecondaryIPAddresses"`
				SecondaryIPv6Addresses interface{} `json:"SecondaryIPv6Addresses"`
				EndpointID             string      `json:"EndpointID"`
				Gateway                string      `json:"Gateway"`
				GlobalIPv6Address      string      `json:"GlobalIPv6Address"`
				GlobalIPv6PrefixLen    int         `json:"GlobalIPv6PrefixLen"`
				IPAddress              string      `json:"IPAddress"`
				IPPrefixLen            int         `json:"IPPrefixLen"`
				IPv6Gateway            string      `json:"IPv6Gateway"`
				MacAddress             string      `json:"MacAddress"`
				Networks               struct {
					Bridge struct {
						IPAMConfig          interface{} `json:"IPAMConfig"`
						Links               interface{} `json:"Links"`
						Aliases             interface{} `json:"Aliases"`
						NetworkID           string      `json:"NetworkID"`
						EndpointID          string      `json:"EndpointID"`
						Gateway             string      `json:"Gateway"`
						IPAddress           string      `json:"IPAddress"`
						IPPrefixLen         int         `json:"IPPrefixLen"`
						IPv6Gateway         string      `json:"IPv6Gateway"`
						GlobalIPv6Address   string      `json:"GlobalIPv6Address"`
						GlobalIPv6PrefixLen int         `json:"GlobalIPv6PrefixLen"`
						MacAddress          string      `json:"MacAddress"`
					} `json:"bridge"`
				} `json:"Networks"`
			} `json:"NetworkSettings"`
		} `json:"dockerInspect"`
		DockerMounts []struct {
			Source      string `json:"Source"`
			Destination string `json:"Destination"`
			Mode        string `json:"Mode"`
			RW          bool   `json:"RW"`
			Propagation string `json:"Propagation"`
		} `json:"dockerMounts"`
	} `json:"data"`
	Token              string      `json:"token"`
	StartCount         int         `json:"startCount"`
	SystemContainer    string      `json:"systemContainer"`
	Removed            interface{} `json:"removed"`
	Userdata           interface{} `json:"userdata"`
	MemoryMb           interface{} `json:"memoryMb"`
	ServiceIndexID     interface{} `json:"serviceIndexId"`
	RemoveTime         interface{} `json:"removeTime"`
	AllocationState    string      `json:"allocationState"`
	Compute            interface{} `json:"compute"`
	NativeContainer    bool        `json:"nativeContainer"`
	NetworkContainerID interface{} `json:"networkContainerId"`
	DNSInternal        interface{} `json:"dnsInternal"`
	DNSSearchInternal  interface{} `json:"dnsSearchInternal"`
	Version            string      `json:"version"`
}

type InstanceFields

type InstanceFields struct {
	ImageUUID          string `json:"imageUuid"`
	PublishAllPorts    bool
	DataVolumes        []string
	Privileged         bool
	ReadOnly           bool
	BlkioDeviceOptions map[string]DeviceOptions
	CommandArgs        []string
	ExtraHosts         []string
	PidMode            container.PidMode
	LogConfig          LogConfig
	SecurityOpt        []string
	Devices            []string
	DNS                []string `json:"dns"`
	DNSSearch          []string `json:"dnsSearch"`
	CapAdd             []string
	CapDrop            []string
	RestartPolicy      container.RestartPolicy
	CPUShares          int64 `json:"cpuShares"`
	VolumeDriver       string
	CPUSet             string
	BlkioWeight        uint16
	CgroupParent       string
	CPUPeriod          int64  `json:"cpuPeriod"`
	CPUQuota           int64  `json:"cpuQuota"`
	CPUsetMems         string `json:"cpuSetMems"`
	DNSOpt             []string
	GroupAdd           []string
	Isolation          container.Isolation
	KernelMemory       int64
	Memory             int64
	MemorySwap         int64
	MemorySwappiness   *int64
	OomKillDisable     *bool
	OomScoreAdj        int
	ShmSize            int64
	Tmpfs              map[string]string
	Ulimits            []*units.Ulimit
	Uts                container.UTSMode
	IpcMode            container.IpcMode
	ConsoleSize        [2]int
	CPUCount           int64
	CPUPercent         int64
	IOMaximumIOps      uint64
	IOMaximumBandwidth uint64
	Command            interface{} // this one is so weird
	Environment        map[string]string
	WorkingDir         string
	EntryPoint         []string
	Tty                bool
	StdinOpen          bool
	DomainName         string
	Labels             map[string]string
	StopSignal         string
	User               string
	Sysctls            map[string]string
	HealthCmd          []string
	HealthTimeout      int
	HealthInterval     int
	HealthRetries      int
	StorageOpt         map[string]string
	PidsLimit          int64
	Cgroup             container.CgroupSpec
	DiskQuota          int64
}

type InstanceFieldsData

type InstanceFieldsData struct {
	Fields InstanceFields
	IPSec  map[string]struct {
		Nat    float64
		Isakmp float64
	} `json:"ipsec"`
	DockerInspect ContainerJSON `json:"dockerInspect,omitempty" yaml:"dockerInspect,omitempty"`
	Process       ProcessData
}

type InstanceForceStop

type InstanceForceStop struct {
	ID   string `json:"id"`
	Kind string `json:"kind"`
}

type InstanceHostMap

type InstanceHostMap struct {
	Host       Host
	HostID     int `json:"hostId"`
	ID         int `json:"id"`
	Instance   Instance
	InstanceID int         `json:"instanceId"`
	Removed    interface{} `json:"removed"`
	State      string      `json:"state"`
	Type       string      `json:"type"`
}

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    Image
	Mode     string `json:"mode"`
	Complete bool   `json:"complete"`
	Tag      string `json:"tag"`
}
type Link struct {
	Type             string
	TargetInstanceID int
	LinkName         string
	TargetInstance   Instance
	Data             LinkData
}

type LinkData

type LinkData struct {
	Fields LinkFields
}

type LinkFields

type LinkFields struct {
	InstanceNames []string
	Ports         []struct {
		Protocol    string
		PrivatePort interface{}
	}
}

type LogConfig

type LogConfig struct {
	Driver string
	Config map[string]string
}

type Method

type Method func(map[string]string, []string) (interface{}, error)

type Nic

type Nic struct {
	MacAddress   string `json:"macAddress"`
	DeviceNumber int    `json:"deviceNumber"`
	IPAddresses  []struct {
		Address string `json:"address"`
		Role    string `json:"role"`
		Subnet  struct {
			CidrSize       int `json:"cidrSize"`
			NetworkAddress string
		} `json:"subnet"`
	} `json:"ipAddresses"`
	Network struct {
		Name            string `json:"name"`
		Kind            string `json:"kind"`
		NetworkServices []Service
	} `json:"network"`
}

type OptionConfig

type OptionConfig struct {
	Key         string
	DevList     []map[string]string
	DockerField string
	Field       string
}

type PingOptions

type PingOptions struct {
	Instances bool `json:"instances,omitempty" yaml:"instances,omitempty"`
}

type PingResource

type PingResource struct {
	Type             string                 `json:"type,omitempty" yaml:"type,omitempty"`
	Kind             string                 `json:"kind,omitempty" yaml:"kind,omitempty"`
	HostName         string                 `json:"hostname,omitempty" yaml:"hostname,omitempty"`
	CreateLabels     map[string]string      `json:"createLabels,omitempty" yaml:"createLabels,omitempty"`
	Labels           map[string]string      `json:"labels,omitempty" yaml:"labels,omitempty"`
	UUID             string                 `json:"uuid,omitempty" yaml:"uuid,omitempty"`
	PhysicalHostUUID string                 `json:"physicalHostUuid,omitempty" yaml:"physicalHostUuid,omitempty"`
	Info             map[string]interface{} `json:"info,omitempty" yaml:"info,omitempty"`
	HostUUID         string                 `json:"hostUuid,omitempty" yaml:"hostUuid,omitempty"`
	Name             string                 `json:"name,omitempty" yaml:"name,omitempty"`
	Addresss         string                 `json:"addresss,omitempty" yaml:"addresss,omitempty"`
	APIProxy         string                 `json:"apiProxy,omitempty" yaml:"apiProxy,omitempty"`
	State            string                 `json:"state,omitempty" yaml:"state,omitempty"`
	SystemContainer  string                 `json:"systemContainer" yaml:"systemContainer"`
	DockerID         string                 `json:"dockerId,omitempty" yaml:"dockerId,omitempty"`
	Image            string                 `json:"image,omitempty" yaml:"image,omitempty"`
	Created          int64                  `json:"created,omitempty" yaml:"created,omitempty"`
	Memory           uint64                 `json:"memory,omitempty" yaml:"memory,omitempty"`
	MilliCPU         uint64                 `json:"milliCpu,omitempty" yaml:"milli_cpu,omitempty"`
	LocalStorageMb   uint64                 `json:"localStorageMb,omitempty" yaml:"local_storage_mb,omitempty"`
}

type PingResponse

type PingResponse struct {
	Resources []PingResource `json:"resources,omitempty" yaml:"resources,omitempty"`
	Options   PingOptions    `json:"options,omitempty" yaml:"options,omitempty"`
}

type Port

type Port struct {
	Protocol    string `json:"protocol"`
	PrivatePort int    `json:"privatePort"`
	PublicPort  int    `json:"publicPort"`
	Data        PortData
	IPAddress   string
}

type PortData

type PortData struct {
	Fields PortFields
}

type PortFields

type PortFields struct {
	BindAddress string
}

type ProcessData

type ProcessData struct {
	ContainerNoOpEvent bool
}

type RegistryCredential

type RegistryCredential struct {
	PublicValue string
	SecretValue string
	Data        CredentialData
}

type RepoTag

type RepoTag struct {
	Repo string
	Tag  string
	UUID string
}

type Resources

type Resources struct {
	// Applicable to all platforms
	CPUShares int64 `json:"CpuShares"` // CPU shares (relative weight vs. other containers)
	Memory    int64 // Memory limit (in bytes)

	// Applicable to UNIX platforms
	CgroupParent         string // Parent cgroup.
	BlkioWeight          uint16 // Block IO weight (relative weight vs. other containers)
	BlkioWeightDevice    []*blkiodev.WeightDevice
	BlkioDeviceReadBps   []*blkiodev.ThrottleDevice
	BlkioDeviceWriteBps  []*blkiodev.ThrottleDevice
	BlkioDeviceReadIOps  []*blkiodev.ThrottleDevice
	BlkioDeviceWriteIOps []*blkiodev.ThrottleDevice
	CPUPeriod            int64                     `json:"CpuPeriod"` // CPU CFS (Completely Fair Scheduler) period
	CPUQuota             int64                     `json:"CpuQuota"`  // CPU CFS (Completely Fair Scheduler) quota
	CpusetCpus           string                    // CpusetCpus 0-2, 0,1
	CpusetMems           string                    // CpusetMems 0-2, 0,1
	Devices              []container.DeviceMapping // List of devices to map inside the container
	DiskQuota            int64                     // Disk limit (in bytes)
	KernelMemory         int64                     // Kernel memory limit (in bytes)
	MemoryReservation    int64                     // Memory soft limit (in bytes)
	MemorySwap           int64                     // Total memory usage (memory + swap); set `-1` to enable unlimited swap
	MemorySwappiness     *int64                    // Tuning container memory swappiness behaviour
	OomKillDisable       *bool                     // Whether to disable OOM Killer or not
	PidsLimit            int64                     // Setting pids limit for a container
	Ulimits              []*units.Ulimit           // List of ulimits to be set in the container

	// Applicable to Windows
	CPUCount           int64  `json:"CpuCount"`   // CPU count
	CPUPercent         int64  `json:"CpuPercent"` // CPU percent
	IOMaximumIOps      uint64 // Maximum IOps for the container system drive
	IOMaximumBandwidth uint64 // Maximum IO in bytes per second for the container system drive
}

type Service

type Service struct {
	Kind string
}

type StoragePool

type StoragePool struct {
	AgentID            int         `json:"agentId"`
	Created            int64       `json:"created"`
	Description        interface{} `json:"description"`
	External           bool        `json:"external"`
	ID                 int         `json:"id"`
	Kind               string      `json:"kind"`
	Name               interface{} `json:"name"`
	PhysicalTotalBytes interface{} `json:"physicalTotalBytes"`
	PhysicalUsedBytes  interface{} `json:"physicalUsedBytes"`
	Removed            interface{} `json:"removed"`
	State              string      `json:"state"`
	Type               string      `json:"type"`
	UUID               string      `json:"uuid"`
	VirtualTotalBytes  interface{} `json:"virtualTotalBytes"`
}

type Tuple

type Tuple struct {
	Src, Dest string
}

type Volume

type Volume struct {
	AccountID       int    `json:"accountId"`
	AllocationState string `json:"allocationState"`
	AttachedState   string `json:"attachedState"`
	Created         int64  `json:"created"`
	Data            VolumeData
	Description     interface{} `json:"description"`
	DeviceNumber    int         `json:"deviceNumber"`
	Format          string      `json:"format"`
	ID              int         `json:"id"`
	Image           Image       `json:"image"`
	ImageID         interface{} `json:"imageId"`
	Instance        Instance    `json:"instance"`
	InstanceID      interface{} `json:"instanceId"`
	Kind            string      `json:"kind"`
	Name            string      `json:"name"`
	Offering        interface{} `json:"offering"`
	OfferingID      interface{} `json:"offeringId"`
	PhysicalSizeMb  interface{} `json:"physicalSizeMb"`
	RemoveTime      int64       `json:"removeTime"`
	Removed         int64       `json:"removed"`
	State           string      `json:"state"`
	StoragePools    []StoragePool
	Type            string      `json:"type"`
	URI             string      `json:"uri"`
	UUID            string      `json:"uuid"`
	VirtualSizeMb   interface{} `json:"virtualSizeMb"`
	ZoneID          int         `json:"zoneId"`
	Driver          string
}

type VolumeData

type VolumeData struct {
	Fields VolumeFields
}

type VolumeFields

type VolumeFields struct {
	Driver     string
	DriverOpts map[string]string
	IsHostPath bool
}

type VolumeStoragePoolMap

type VolumeStoragePoolMap struct {
	ID                  int         `json:"id"`
	Removed             interface{} `json:"removed"`
	State               string      `json:"state"`
	StoragePool         StoragePool
	StoragePoolID       int         `json:"storagePoolId"`
	StoragePoolLocation interface{} `json:"storagePoolLocation"`
	Volume              Volume
	VolumeID            int `json:"volumeId"`
}

Jump to

Keyboard shortcuts

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