model

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 7 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 ContainerDelete

type ContainerDelete struct {
	Force                       bool `json:"force,omitempty"`
	DelEtcdInfoAndVersionRecord bool `json:"delEtcdInfoAndVersionRecord,omitempty"`
}

type ContainerExecute

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

type ContainerGpuPatch

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

type ContainerRun

type ContainerRun struct {
	ImageName      string   `json:"imageName"`
	ContainerName  string   `json:"containerName"`
	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 ContainerStop

type ContainerStop struct {
	RestoreGpus  bool `json:"restoreGpus,omitempty"`
	RestorePorts bool `json:"restorePorts,omitempty"`
}

type ContainerVolumePatch

type ContainerVolumePatch struct {
	Type    mount.Type `json:"type"`
	OldBind *Bind      `json:"oldBind"`
	NewBind *Bind      `json:"newBind"`
}

type EtcdContainerInfo

type EtcdContainerInfo struct {
	Config           *container.Config         `json:"Config"`
	HostConfig       *container.HostConfig     `json:"HostConfig"`
	NetworkingConfig *network.NetworkingConfig `json:"NetworkingConfig"`
	Platform         *ocispec.Platform         `json:"Platform"`
	ContainerName    string                    `json:"ContainerName"`
	Version          int64                     `json:"Version"`
}

func (*EtcdContainerInfo) Serialize

func (i *EtcdContainerInfo) Serialize() *string

type EtcdVolumeInfo

type EtcdVolumeInfo struct {
	Opt     *volume.CreateOptions
	Version int64 `json:"Version"`
}

func (*EtcdVolumeInfo) Serialize

func (i *EtcdVolumeInfo) Serialize() *string

type GpuInfo

type GpuInfo struct {
	Index                       int           `json:"index"`
	UUID                        string        `json:"uuid"`
	Name                        string        `json:"name"`
	MemoryInfo                  Memory        `json:"memoryInfo"`
	PowerUsage                  uint32        `json:"powerUsage"`
	PowerState                  int32         `json:"powerState"`
	PowerManagementDefaultLimit uint32        `json:"powerManagementDefaultLimit"`
	InformImageVersion          string        `json:"informImageVersion"`
	DriverVersion               string        `json:"systemGetDriverVersion"`
	CUDADriverVersion           int           `json:"systemGetCudaDriverVersion"`
	GraphicsRunningProcesses    []ProcessInfo `json:"tGraphicsRunningProcesses"`
}

type Memory

type Memory struct {
	Total uint64
	Free  uint64
	Used  uint64
}

type ProcessInfo

type ProcessInfo struct {
	Pid               uint32
	UsedGpuMemory     uint64
	GpuInstanceId     uint32
	ComputeInstanceId uint32
}

type VolumeCreate

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

type VolumeDelete

type VolumeDelete struct {
	Force                       bool `json:"force"`
	DelEtcdInfoAndVersionRecord bool `json:"delEtcdInfoAndVersionRecord"`
}

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