manifest

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TCP = ServiceProtocol("TCP")
	UDP = ServiceProtocol("UDP")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

type Attribute struct {
	Key   string
	Value string
}

type AttributeValue

type AttributeValue interface {
	AsBool() (bool, bool)
	AsString() (string, bool)
}

type Attributes

type Attributes []Attribute

func (Attributes) Find

func (attr Attributes) Find(glob string) AttributeValue

type CPU

type CPU struct {
	Units      ResourceValue
	Attributes []Attribute
}

func NewCPU

func NewCPU(cpu uint64) *CPU

type DeploymentID

type DeploymentID struct {
	ID    string
	Owner string
}

type Endpoint

type Endpoint struct {
	// contains filtered or unexported fields
}

type GPU

type GPU struct {
	Units      ResourceValue
	Attributes Attributes
}

func NewGPU

func NewGPU(gpu uint64) *GPU

type Group

type Group struct {
	Name     string
	Services []Service
}

type Kind

type Kind int
const (
	ShareHTTP Kind = iota
	RandomPort
	LEASED_IP
)

type Memory

type Memory struct {
	Quantity   ResourceValue
	Attributes []Attribute
}

func NewMemory

func NewMemory(memory uint64) *Memory

type ResourceUnits

type ResourceUnits struct {
	CPU       *CPU
	Memory    *Memory
	Storage   []*Storage
	GPU       *GPU
	Endpoints []*Endpoint
}

func NewResourceUnits

func NewResourceUnits(cpu, gpu, memory uint64, storage []*Storage) *ResourceUnits

type ResourceValue

type ResourceValue struct {
	Val *big.Int
}

func NewResourceValue

func NewResourceValue(v uint64) ResourceValue

type Service

type Service struct {
	Name      string
	Image     string
	Command   []string
	Args      []string
	Env       []string
	Resources *ResourceUnits
	Count     int32
	Expose    []*ServiceExpose
	Params    *ServiceParams
	OSType    string
}

type ServiceExpose

type ServiceExpose struct {
	// request
	Port         uint32
	ExternalPort uint32
	// request
	Proto                  ServiceProtocol
	Service                string
	Global                 bool
	Hosts                  []string
	HTTPOptions            ServiceExposeHTTPOptions
	IP                     string
	EndpointSequenceNumber uint32
}

ServiceExpose stores exposed ports and hosts details

type ServiceExposeHTTPOptions

type ServiceExposeHTTPOptions struct {
	MaxBodySize uint32
	ReadTimeout uint32
	SendTimeout uint32
	NextTries   uint32
	NextTimeout uint32
	NextCases   []string
}

type ServiceParams

type ServiceParams struct {
	Storage []StorageParams
}

type ServiceProtocol

type ServiceProtocol string

func (ServiceProtocol) ToString

func (sp ServiceProtocol) ToString() string

type Storage

type Storage struct {
	Name       string
	Quantity   ResourceValue
	Attributes Attributes
}

func NewStorage

func NewStorage(name string, quantity uint64, persistent bool, mount string) *Storage

type StorageParams

type StorageParams struct {
	Name     string
	Mount    string
	ReadOnly bool
}

Jump to

Keyboard shortcuts

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