types

package
Version: v0.0.0-...-a58d3e8 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2019 License: Apache-2.0 Imports: 3 Imported by: 78

Documentation

Index

Constants

View Source
const (
	XenVirtualizationType_HVM         = "hvm"
	XenVirtualizationType_Paravirtual = "paravirtual"
)
View Source
const (
	StorageDriver_SCSI = "SCSI"
	StorageDriver_SATA = "SATA"
	StorageDriver_IDE  = "IDE"
)
View Source
const (
	VsphereNetworkType_E1000   = "e1000"
	VsphereNetworkType_VMXNET3 = "vmxnet3"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CompileImageParams

type CompileImageParams struct {
	SourcesDir string
	Args       string
	MntPoints  []string
	NoCleanup  bool
	SizeMB     int
}

type CreateVolumeParams

type CreateVolumeParams struct {
	Name      string
	ImagePath string
	NoCleanup bool
}

type DeviceMapping

type DeviceMapping struct {
	MountPoint string `json:"MountPoint"`
	DeviceName string `json:"DeviceName"`
}

type Image

type Image struct {
	Id             string         `json:"Id"`
	Name           string         `json:"Name"`
	SizeMb         int64          `json:"SizeMb"`
	Infrastructure Infrastructure `json:"Infrastructure"`
	Created        time.Time      `json:"Created"`
	StageSpec      StageSpec      `json:"StageSpec"`
	RunSpec        RunSpec        `json:"RunSpec"`
}

func (*Image) String

func (image *Image) String() string

type ImageFormat

type ImageFormat string
const (
	ImageFormat_RAW    ImageFormat = "raw"
	ImageFormat_QCOW2  ImageFormat = "qcow2"
	ImageFormat_VHD    ImageFormat = "vhd"
	ImageFormat_VMDK   ImageFormat = "vmdk"
	ImageFormat_Folder ImageFormat = "folder"
)

type Infrastructure

type Infrastructure string
const (
	Infrastructure_AWS         Infrastructure = "AWS"
	Infrastructure_GCLOUD      Infrastructure = "GCLOUD"
	Infrastructure_VSPHERE     Infrastructure = "VSPHERE"
	Infrastructure_VIRTUALBOX  Infrastructure = "VIRTUALBOX"
	Infrastructure_QEMU        Infrastructure = "QEMU"
	Infrastructure_PHOTON      Infrastructure = "PHOTON"
	Infrastructure_XEN         Infrastructure = "XEN"
	Infrastructure_OPENSTACK   Infrastructure = "OPENSTACK"
	Infrastructure_UKVM        Infrastructure = "UKVM"
	Infrastructure_FIRECRACKER Infrastructure = "FIRECRACKER"
)

type Instance

type Instance struct {
	Id             string         `json:"Id"`
	Name           string         `json:"Name"`
	State          InstanceState  `json:"State"`
	IpAddress      string         `json:"IpAddress"`
	ImageId        string         `json:"ImageId"`
	Infrastructure Infrastructure `json:"Infrastructure"`
	Created        time.Time      `json:"Created"`
}

func (*Instance) String

func (instance *Instance) String() string

type InstanceState

type InstanceState string
const (
	InstanceState_Running    InstanceState = "running"
	InstanceState_Stopped    InstanceState = "stopped"
	InstanceState_Pending    InstanceState = "pending"
	InstanceState_Unknown    InstanceState = "unknown"
	InstanceState_Terminated InstanceState = "terminated"
	InstanceState_Error      InstanceState = "error"
	InstanceState_Paused     InstanceState = "paused"
	InstanceState_Suspended  InstanceState = "suspended"
)

type PullImagePararms

type PullImagePararms struct {
	Config    config.HubConfig
	ImageName string
	Force     bool
}

type PushImagePararms

type PushImagePararms struct {
	Config    config.HubConfig
	ImageName string
}

type RawImage

type RawImage struct {
	LocalImagePath string    `json:"LocalImagePath"`
	StageSpec      StageSpec `json:"StageSpec"`
	RunSpec        RunSpec   `json:"RunSpec"`
}

type RemoteDeleteImagePararms

type RemoteDeleteImagePararms struct {
	Config    config.HubConfig
	ImageName string
}

type RunInstanceParams

type RunInstanceParams struct {
	Name                 string
	ImageId              string
	MntPointsToVolumeIds map[string]string
	Env                  map[string]string
	InstanceMemory       int
	NoCleanup            bool
	DebugMode            bool
}

type RunSpec

type RunSpec struct {
	DeviceMappings []DeviceMapping `json:"DeviceMappings"` //required for all compilers
	// DefaultInstanceMemory is in MB
	DefaultInstanceMemory int                `json:"DefaultInstanceMemory"` //required for all compilers
	MinInstanceDiskMB     int                `json:"MinInstanceDiskMB"`
	StorageDriver         StorageDriver      `json:"StorageDriver,omitempty"`
	VsphereNetworkType    VsphereNetworkType `json:"VsphereNetworkType"`
	Compiler              string             `json:"Compiler,omitempty"`
}

type StageImageParams

type StageImageParams struct {
	Name      string
	RawImage  *RawImage
	Force     bool
	NoCleanup bool
}

type StageSpec

type StageSpec struct {
	ImageFormat           ImageFormat           `json:"ImageFormat"` //required for all compilers
	XenVirtualizationType XenVirtualizationType `json:"XenVirtualizationType,omitempty"`
}

type StorageDriver

type StorageDriver string

type UserImage

type UserImage struct {
	*Image `json:"image"`
	Owner  string `json:"owner"`
}

For Unik Hub

type Volume

type Volume struct {
	Id             string         `json:"Id"`
	Name           string         `json:"Name"`
	SizeMb         int64          `json:"SizeMb"`
	Attachment     string         `json:"Attachment"` //instanceId
	Infrastructure Infrastructure `json:"Infrastructure"`
	Created        time.Time      `json:"Created"`
}

func (*Volume) String

func (volume *Volume) String() string

type VsphereNetworkType

type VsphereNetworkType string

type XenVirtualizationType

type XenVirtualizationType string

Source Files

Jump to

Keyboard shortcuts

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