dto

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: AGPL-3.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BindMount

type BindMount struct {
	Source      string `json:"source"`      // Host path
	Destination string `json:"destination"` // Container path
	ReadOnly    bool   `json:"readonly,omitempty"`
}

type Capabilities added in v0.2.0

type Capabilities struct {
	ContainersEngine     bool `json:"containers_engine"`
	ContainersNetworking bool `json:"containers_networking"`
	Volumes              bool `json:"volumes"`
	VolumesZFS           bool `json:"volumes_zfs"`
	VMM                  bool `json:"vmm"`
}

func NewCapabilities added in v0.2.0

func NewCapabilities(c common.Capabilities) Capabilities

type ContainerStatus added in v0.1.8

type ContainerStatus string
const (
	ContainerStatusStart        ContainerStatus = "start"
	ContainerStatusStartFaailed ContainerStatus = "start_failed"
	ContainerStatusStop         ContainerStatus = "stop"
	ContainerStatusStopFailed   ContainerStatus = "stop_failed"
)

type CpuArch

type CpuArch uint8

CpuArch represents the type of CPU architecture

const (
	X86 CpuArch = iota
	X64
	Arm2
	Arm3
	Arm4T
	Arm5
	Arm6T2
	Arm6
	Arm7
	Arm7a
	Arm7r
	Arm7s
	Arm64
	Mips
	SuperH
	Ppc
	Ppc64
	Sparc
	M68k
	OtherArch
)

type CpuCFS

type CpuCFS struct {
	CpuQuota  int64  `json:"quota"`
	CpuPeriod uint64 `json:"period"`
}

type CreateContainerRequest

type CreateContainerRequest struct {
	Image       string         `json:"image"`
	MountVolume *[]MountVolume `json:"mount_volume,omitempty"`
	BindMounts  []BindMount    `json:"bind_mounts,omitempty"`
	Env         []string       `json:"env,omitempty"`
	Quotas      *Quotas        `json:"quotas,omitempty"`
	Entrypoint  *string        `json:"entrypoint,omitempty"`
	Args        []string       `json:"args,omitempty"`
	WorkingDir  *string        `json:"working_dir,omitempty"`

	// Prefix for the names of the volumes in MountVolume. Volumes are named
	// "<prefix>-<mount point>" so they're reused across container restarts.
	// Defaults to the container name.
	VolumePrefix string `json:"volume_prefix,omitempty"`
}

type ErrorResponse

type ErrorResponse struct {
	Error string `json:"error"`
}

type FileDataResponse

type FileDataResponse struct {
	Data   string `json:"data"`
	EndPos int64  `json:"end_pos"`
}

type GuestNodeResponse added in v0.2.8

type GuestNodeResponse struct {
	Name   string                  `json:"name"`
	Config common.NodeDriverConfig `json:"config"`
	NodeResponse
}

GuestNodeResponse describes a guest node managed by the agent

type Image

type Image struct {
	Name      string    `json:"name"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type ImagesResponse

type ImagesResponse []Image

type JobRequest added in v0.2.5

type JobRequest struct {
	Name string `json:"name"`
	common.JobDriverConfig
	Arguments []string `json:"arguments,omitempty"`
}

type LoadDeployment

type LoadDeployment struct {
	LoadName         string                  `json:"load_name"`
	DeploymentId     string                  `json:"deployment_id"`
	DeploymentStatus common.DeploymentStatus `json:"deployment_status"`
	Driver           common.LoadDriverID     `json:"driver"`
	DriverConfig     any                     `json:"driver_config"`
	Metadata         any                     `json:"metadata,omitempty"`
}

type LoadInfo

type LoadInfo struct {
	Name         string `json:"name"`
	Node         string `json:"node"`
	Driver       string `json:"driver"`
	DriverConfig any    `json:"driver_config"`
}

type LoadsDeployments

type LoadsDeployments []LoadDeployment

type LoadsInfo

type LoadsInfo []LoadInfo

type MountVolume

type MountVolume struct {
	VolumeMountPoint string  `json:"volume_mount_point"`
	VolumeSize       *string `json:"volume_size,omitempty"`
}

type NetworkConfig

type NetworkConfig struct {
	Mode    string    `json:"mode,omitempty"`    // Network mode: "bridge" (default) or "host"
	Network string    `json:"network,omitempty"` // Network name (only used in bridge mode)
	IPMasq  bool      `json:"ip_masq,omitempty"`
	DNS     bool      `json:"dns,omitempty"`
	PortMap []Portmap `json:"portmap,omitempty"`
}

type NodeImagesMapResponse

type NodeImagesMapResponse []NodeImagesResponse

type NodeImagesResponse

type NodeImagesResponse struct {
	Node   string         `json:"node"`
	Images ImagesResponse `json:"images,omitempty"`
	Error  string         `json:"error,omitempty"`
}

type NodeResponse added in v0.1.2

type NodeResponse struct {
	State  common.NodeState  `json:"state"`
	Status common.NodeStatus `json:"status"`
}

func NewNodeResponse added in v0.2.0

func NewNodeResponse() NodeResponse

type OsKind

type OsKind uint8

OsKind represents the type of operating system

const (
	WindowsOs OsKind = iota
	LinuxOs
	AndroidOs
	AppleOs
	UnixOs
	PosixOs
	OtherOs
)

type Portmap

type Portmap struct {
	HostPort      uint16 `json:"host_port"`
	ContainerPort uint16 `json:"container_port"`
	Protocol      string `json:"protocol"`
}

type ProvisionLoadInfo added in v0.1.2

type ProvisionLoadInfo struct {
	DeploymentId string `json:"deployment_id"`
}

type Quotas

type Quotas struct {
	MemLimit  *uint64 `json:"mem_limit,omitempty"` // Megabytes
	CpuCFS    *CpuCFS `json:"cpu_cfs,omitempty"`
	CpuShares *uint64 `json:"cpu_shares,omitempty"`
}

type RestartNodeRequest

type RestartNodeRequest struct {
	WallMessage string `json:"wall_message"`
	Time        uint32 `json:"time"`
}

type ShutdownNodeRequest

type ShutdownNodeRequest struct {
	WallMessage string `json:"wall_message"`
	Time        uint32 `json:"time"`
}

type SystemInfo

type SystemInfo struct {
	OsName            string       `json:"os_name"`              // Name of the OS, reported by the OS
	OsKind            OsKind       `json:"os_kind"`              // Kind of OS
	OsArch            CpuArch      `json:"os_arch"`              // CPU architecture
	SysVendor         string       `json:"sys_vendor"`           // System vendor string
	NetDefaultGateway string       `json:"net_default_gateway"`  // Default network gateway
	NetHostName       string       `json:"net_host_name"`        // Network name of this host
	NetDomainName     string       `json:"net_domain_name"`      // Domain name of this host
	NetPrimaryDns     string       `json:"net_primary_dns"`      // Primary network DNS
	NetSecondaryDns   string       `json:"net_secondary_dns"`    // Secondary network DNS
	NetPrimaryIpAddr  string       `json:"net_primary_ip_addr"`  // Primary IP address
	NetMacAddress     string       `json:"net_mac_address"`      // Primary MAC address
	CpuModel          string       `json:"cpu_model"`            // CPU model string
	CpuStartTime      int64        `json:"cpu_start_time"`       // Time when the CPU got powered (Unix timestamp in nanoseconds)
	CpuTotalCores     uint32       `json:"cpu_total_cores"`      // Number of cores of the CPU
	CpuCoresPerSocket uint32       `json:"cpu_cores_per_socket"` // Number of cores per socket
	CpuTotalSockets   uint32       `json:"cpu_total_sockets"`    // Number of sockets
	CpuVendor         string       `json:"cpu_vendor"`           // CPU vendor string
	CpuMhz            uint32       `json:"cpu_mhz"`              // Maximum CPU frequency in Megahertz
	RamTotal          uint64       `json:"ram_total"`            // Total available RAM in bytes
	Capabilities      Capabilities `json:"capabilities"`         // System capabilities
}

SystemInfo contains static information about a computer

Jump to

Keyboard shortcuts

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