cmd

package
v0.0.0-...-d615174 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2019 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

View Source
const Version = "v1"

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckType

type CheckType string
const (
	HTTP CheckType = "http"
	TCP  CheckType = "tcp"
	GRPC CheckType = "grpc"
)

type Container

type Container struct {
	ConfigVersion string             `toml:"config_version"`
	ID            string             `toml:"id"`
	Image         string             `toml:"image"`
	Resources     *Resources         `toml:"resources"`
	GPUs          *GPUs              `toml:"gpus"`
	Mounts        []Mount            `toml:"mounts"`
	Env           []string           `toml:"env"`
	Args          []string           `toml:"args"`
	UID           *int               `toml:"uid"`
	GID           *int               `toml:"gid"`
	Network       string             `toml:"network"`
	Services      map[string]Service `toml:"services"`
	Configs       map[string]File    `toml:"configs"`
	Readonly      bool               `toml:"readonly"`
	Capabilities  []string           `toml:"caps"`
	Volumes       map[string]Volume  `toml:"volumes"`
}

func (*Container) Proto

func (c *Container) Proto() *v1.Container

type File

type File struct {
	Path    string `toml:"path"`
	Source  string `toml:"source"`
	Content string `toml:"content"`
	// Signal to be sent when the config changes
	Signal string `toml:"signal"`
}

type GPUs

type GPUs struct {
	Devices     []int64  `toml:"devices"`
	Capbilities []string `toml:"capabilities"`
}

type Mount

type Mount struct {
	Type        string   `toml:"type"`
	Source      string   `toml:"source"`
	Destination string   `toml:"destination"`
	Options     []string `toml:"options"`
}

type Resources

type Resources struct {
	CPU    float64 `toml:"cpu"`
	Memory int64   `toml:"memory"`
	Score  int64   `toml:"score"`
	NoFile uint64  `toml:"no_file"`
}

type Service

type Service struct {
	Port          int64     `toml:"port"`
	Labels        []string  `toml:"labels"`
	URL           string    `toml:"url"`
	CheckType     CheckType `toml:"check_type"`
	CheckInterval int64     `toml:"check_interval"`
	CheckTimeout  int64     `toml:"check_timeout"`
	CheckMethod   string    `toml:"check_method"`
}

type Volume

type Volume struct {
	Destination string `toml:"destination"`
	RW          bool   `toml:"rw"`
}

Jump to

Keyboard shortcuts

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