types

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: MIT Imports: 3 Imported by: 14

Documentation

Index

Constants

View Source
const CPUPeriodBase = 100000

CPUPeriodBase is the cfs period a workload's cpu quota is expressed against.

Variables

This section is empty.

Functions

func ImageDigest added in v0.1.1

func ImageDigest(image, digest string) string

ImageDigest renders the digest form core compares; a cloud image url stands for itself.

func IsURL added in v0.1.1

func IsURL(image string) bool

IsURL reports whether the image is a plain download url rather than a registry ref.

func ParseDescriptor added in v0.1.1

func ParseDescriptor(out string) (string, error)

ParseDescriptor reads the digest out of an OCI descriptor.

func SplitRef added in v0.1.1

func SplitRef(ref string) (name, tag string)

SplitRef separates an image reference from its tag, ignoring a registry port.

Types

type Build

type Build struct {
	Base       string            `yaml:"base,omitempty"`
	Repo       string            `yaml:"repo,omitempty"`
	Version    string            `yaml:"version,omitempty"`
	Dir        string            `yaml:"dir,omitempty"`
	Submodule  bool              `yaml:"submodule,omitempty"`
	Security   bool              `yaml:"security,omitempty"`
	Commands   []string          `yaml:"commands,omitempty,flow"`
	Envs       map[string]string `yaml:"envs,omitempty,flow"`
	Args       map[string]string `yaml:"args,omitempty,flow"`
	Labels     map[string]string `yaml:"labels,omitempty,flow"`
	Artifacts  map[string]string `yaml:"artifacts,omitempty,flow"`
	Cache      map[string]string `yaml:"cache,omitempty,flow"`
	StopSignal string            `yaml:"stop_signal,omitempty,flow"`
}

type BuildContentOptions

type BuildContentOptions struct {
	User string
	UID  int
	*Builds
}

type BuildRefOptions

type BuildRefOptions struct {
	Name string
	Tags []string
	User string
}

type Builds

type Builds struct {
	Stages []string          `yaml:"stages,omitempty,flow"`
	Builds map[string]*Build `yaml:"builds,omitempty,flow"`
}

type ExecConfig

type ExecConfig struct {
	User        string
	Tty         bool
	AttachStdin bool
	Env         []string
	WorkingDir  string
	Cmd         []string
}

ExecConfig mirrors the exec subset of docker's api/types Config.

type HealthCheck added in v0.1.1

type HealthCheck struct {
	TCPPorts []string `json:"tcp_ports,omitempty"`
	HTTPPort string   `json:"http_port,omitempty"`
	HTTPURL  string   `json:"http_url,omitempty"`
	HTTPCode int      `json:"http_code,omitempty"`
}

HealthCheck is the probe a workload record hands to eru-agent.

type Image

type Image struct {
	ID   string
	Tags []string
}

Image is an image's ID and tags.

type Info

type Info struct {
	Type         string
	ID           string
	NCPU         int
	MemTotal     int64
	StorageTotal int64
}

Info is a node's runtime capacity as reported by its engine.

type Network

type Network struct {
	Name    string
	Subnets []string
}

type Params

type Params struct {
	Nodename string
	Endpoint string
}

type RawEngineOptions

type RawEngineOptions struct {
	ID     string
	Op     string
	Params []byte
}

type RawEngineResult

type RawEngineResult struct {
	ID   string
	Data []byte
}

type VirtualizationCreateOptions

type VirtualizationCreateOptions struct {
	EngineParams resourcetypes.Resources
	Name         string
	User         string
	Image        string
	WorkingDir   string
	Stdin        bool
	Privileged   bool
	Cmd          []string
	Env          []string
	DNS          []string
	Hosts        []string
	Sysctl       map[string]string
	Labels       map[string]string

	Restart string

	Networks map[string]string

	RawArgs []byte
	Lambda  bool
}

VirtualizationCreateOptions describes a workload to create.

type VirtualizationCreated

type VirtualizationCreated struct {
	ID     string
	Name   string
	Labels map[string]string
}

VirtualizationCreated identifies a freshly created workload.

type VirtualizationInfo

type VirtualizationInfo struct {
	ID       string
	User     string
	Image    string
	Running  bool
	Networks map[string]string
}

type VirtualizationLogStreamOptions

type VirtualizationLogStreamOptions struct {
	ID     string
	Tail   string
	Since  string
	Until  string
	Follow bool
}

type VirtualizationWaitResult

type VirtualizationWaitResult struct {
	Message string
	Code    int64
}

VirtualizationWaitResult carries a workload's exit status.

Jump to

Keyboard shortcuts

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