config

package
v0.0.0-...-f1bde72 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "v1"

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigFile

type ConfigFile struct {
	ID   string `toml:"id"`
	Path string `toml:"path"`
}

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"`
	Networks     []*Network   `toml:"networks"`
	Services     []string     `toml:"services"`
	Configs      []ConfigFile `toml:"configs"`
	Readonly     bool         `toml:"readonly"`
	Capabilities []string     `toml:"capabilities"`
	Privileged   bool         `toml:"privileged"`
	Pty          bool         `toml:"pty"`
	MaskedPaths  []string     `toml:"masked_paths"`
}

func (*Container) Proto

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

type GPUs

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

type IPAM

type IPAM struct {
	Type        string `toml:"type"`
	Subnet      string `toml:"subnet"`
	SubnetRange string `toml:"subnet_range"`
	Gateway     string `toml:"gateway"`
}

type Mount

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

type Network

type Network struct {
	Type   string `toml:"type"`
	Name   string `toml:"name"`
	Master string `toml:"master"`
	Bridge string `toml:"bridge"`
	IPAM   IPAM   `toml:"ipam"`
}

type Resources

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

Jump to

Keyboard shortcuts

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