types

package
v1.1.2-0...-5d0101c Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Architectures = []string{
	"amd64",
	"arm64",
}
View Source
var InstanceStates = []string{
	"Scheduling",
	"Pulling",
	"Started",
	"Stopping",
	"Stopped",
	"Terminating",
	"Terminated",
	"Error",
	"Pushing",
}
View Source
var NodeStates = []string{
	"Offline",
	"Inactive (Invalid License)",
	"Active",
	"Updating",
	"Drain Mode",
}

Functions

This section is empty.

Types

type DefaultResponse

type DefaultResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
}

func (*DefaultResponse) GetMessage

func (dr *DefaultResponse) GetMessage() string

func (*DefaultResponse) GetStatus

func (dr *DefaultResponse) GetStatus() string

type Instance

type Instance struct {
	InstanceID string `json:"instance_id"`
	Vm         VmData `json:"vm"`
}

type InstancesResponse

type InstancesResponse struct {
	DefaultResponse
	Body []Instance `json:"body"`
}

func (*InstancesResponse) GetBody

func (ir *InstancesResponse) GetBody() interface{}

type Node

type Node struct {
	NodeID         string      `json:"node_id"`
	NodeName       string      `json:"node_name"`
	CPU            uint        `json:"cpu_count"`
	RAM            uint        `json:"ram"`
	VMCount        uint        `json:"vm_count"`
	UsedVCPUCount  uint        `json:"vcpu_count"`
	UsedVRAM       uint        `json:"vram"`
	CPUUtilization float64     `json:"cpu_util"`
	RAMUtilization float64     `json:"ram_util"`
	FreeDiskSpace  uint        `json:"free_disk_space"`
	AnkaDiskUsage  uint        `json:"anka_disk_usage"`
	DiskSize       uint        `json:"disk_size"`
	State          string      `json:"state"`
	Capacity       uint        `json:"capacity"`
	HostArch       string      `json:"host_arch"`
	Groups         []NodeGroup `json:"groups"`
}

type NodeGroup

type NodeGroup struct {
	Id              string `json:"id"`
	Name            string `json:"name"`
	Description     string `json:"description"`
	FallBackGroupId string `json:"fallback_group_id"`
}

type NodesResponse

type NodesResponse struct {
	DefaultResponse
	Body []Node `json:"body"`
}

func (*NodesResponse) GetBody

func (nr *NodesResponse) GetBody() interface{}

type RegistryDisk

type RegistryDisk struct {
	Total uint64 `json:"total"`
	Free  uint64 `json:"free"`
}

type RegistryDiskResponse

type RegistryDiskResponse struct {
	DefaultResponse
	Body RegistryDisk `json:"body"`
}

func (*RegistryDiskResponse) GetBody

func (rdr *RegistryDiskResponse) GetBody() interface{}

type RegistryTemplateResponse

type RegistryTemplateResponse struct {
	DefaultResponse
	Body []Template `json:"body"`
}

func (*RegistryTemplateResponse) GetBody

func (rtr *RegistryTemplateResponse) GetBody() interface{}

type RegistryTemplateTags

type RegistryTemplateTags struct {
	Versions []TemplateTag `json:"versions"`
}

type RegistryTemplateTagsResponse

type RegistryTemplateTagsResponse struct {
	DefaultResponse
	Body RegistryTemplateTags `json:"body"`
}

func (*RegistryTemplateTagsResponse) GetBody

func (rttr *RegistryTemplateTagsResponse) GetBody() interface{}

type Response

type Response interface {
	GetStatus() string
	GetMessage() string
	GetBody() interface{}
}

type Template

type Template struct {
	UUID string `json:"id"`
	Name string `json:"name"`
	Size uint   `json:"size"`
	Tags []TemplateTag
}

type TemplateTag

type TemplateTag struct {
	Name string `json:"tag"`
	Size uint   `json:"size"`
}

type VmData

type VmData struct {
	State        string `json:"instance_state"`
	TemplateUUID string `json:"vmid"`
	TemplateName string
	GroupUUID    string `json:"group_id"`
	NodeUUID     string `json:"node_id"`
	Arch         string `json:"arch"`
}

Jump to

Keyboard shortcuts

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