models

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var VolumeSizeMap = map[string]struct{}{
	"KB": {},
	"MB": {},
	"GB": {},
	"TB": {},
}

Functions

This section is empty.

Types

type Bind

type Bind struct {
	Src  string `json:"src"`
	Dest string `json:"dest"`
}

func (*Bind) Format

func (b *Bind) Format() string

type ContainerCommit

type ContainerCommit struct {
	NewImageName string `json:"newImageName"`
}

type ContainerExecute

type ContainerExecute struct {
	WorkDir string   `json:"workDir,omitempty"`
	Cmd     []string `json:"cmd,omitempty"`
}

type ContainerHistoryItem

type ContainerHistoryItem struct {
	Version    int64             `json:"version"`
	CreateTime string            `json:"createTime"`
	Status     EtcdContainerInfo `json:"status"`
}

type ContainerRun

type ContainerRun struct {
	ImageName      string   `json:"imageName"`
	ReplicaSetName string   `json:"replicaSetName"`
	GpuCount       int      `json:"gpuCount,omitempty"`
	Binds          []Bind   `json:"binds,omitempty"`
	Env            []string `json:"env,omitempty"`
	Cmd            []string `json:"cmd,omitempty"`
	ContainerPorts []string `json:"containerPorts,omitempty"`
}

type EtcdContainerInfo

type EtcdContainerInfo struct {
	Version          int64                     `json:"version"`
	CreateTime       string                    `json:"createTime"`
	Config           *container.Config         `json:"config"`
	HostConfig       *container.HostConfig     `json:"hostConfig"`
	NetworkingConfig *network.NetworkingConfig `json:"networkingConfig"`
	Platform         *ocispec.Platform         `json:"platform"`
	ContainerName    string                    `json:"containerName"`
}

func (*EtcdContainerInfo) Serialize

func (i *EtcdContainerInfo) Serialize() *string

type EtcdVolumeInfo

type EtcdVolumeInfo struct {
	Version    int64                 `json:"version"`
	CreateTime string                `json:"createTime"`
	Opt        *volume.CreateOptions `json:"opt"`
}

func (*EtcdVolumeInfo) Serialize

func (i *EtcdVolumeInfo) Serialize() *string

type GpuPatch

type GpuPatch struct {
	GpuCount int `json:"gpuCount"`
}

type PatchRequest

type PatchRequest struct {
	GpuPatch    *GpuPatch    `json:"gpuPatch"`
	VolumePatch *VolumePatch `json:"volumePatch"`
}

type RollbackRequest

type RollbackRequest struct {
	Version int64 `json:"version"`
}

type VolumeCreate

type VolumeCreate struct {
	Name string `json:"name,omitempty"`
	Size string `json:"size,omitempty"`
}

type VolumeHistoryItem

type VolumeHistoryItem struct {
	Version    int64          `json:"version"`
	CreateTime string         `json:"createTime"`
	Status     EtcdVolumeInfo `json:"status"`
}

type VolumePatch

type VolumePatch struct {
	OldBind *Bind `json:"oldBind"`
	NewBind *Bind `json:"newBind"`
}

type VolumeSize

type VolumeSize struct {
	Size string `json:"size"` // KB, MB, GB, TB
}

Jump to

Keyboard shortcuts

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