Help us shape the future of Go! Take the 2026 Go Developer Survey

json

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2016 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INIT_RESERVED = iota
	INIT_STARTPOD
	INIT_GETPOD
	INIT_STOPPOD
	INIT_DESTROYPOD
	INIT_RESTARTCONTAINER
	INIT_EXECCMD
	INIT_FINISHCMD
	INIT_READY
	INIT_ACK
	INIT_ERROR
	INIT_WINSIZE
	INIT_PING
	INIT_FINISHPOD
	INIT_NEXT
	INIT_WRITEFILE
	INIT_READFILE
	INIT_NEWCONTAINER
	INIT_KILLCONTAINER
	INIT_ONLINECPUMEM
	INIT_SETUPINTERFACE
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	Id            string             `json:"id"`
	Rootfs        string             `json:"rootfs"`
	Fstype        string             `json:"fstype,omitempty"`
	Image         string             `json:"image"`
	Addr          string             `json:"addr,omitempty"`
	Volumes       []VolumeDescriptor `json:"volumes,omitempty"`
	Fsmap         []FsmapDescriptor  `json:"fsmap,omitempty"`
	Sysctl        map[string]string  `json:"sysctl,omitempty"`
	Process       Process            `json:"process"`
	RestartPolicy string             `json:"restartPolicy"`
	Initialize    bool               `json:"initialize"`
}

func (*Container) RoLookup

func (cr *Container) RoLookup(mpoint string) bool

type DecodedMessage

type DecodedMessage struct {
	Code    uint32
	Message []byte
}

Message

type EnvironmentVar

type EnvironmentVar struct {
	Env   string `json:"env"`
	Value string `json:"value"`
}

type ExecCommand

type ExecCommand struct {
	Container string  `json:"container,omitempty"`
	Process   Process `json:"process"`
}

type FileCommand

type FileCommand struct {
	Container string `json:"container"`
	File      string `json:"file"`
}

type FsmapDescriptor

type FsmapDescriptor struct {
	Source       string `json:"source"`
	Path         string `json:"path"`
	ReadOnly     bool   `json:"readOnly"`
	DockerVolume bool   `json:"dockerVolume"`
}

type KillCommand

type KillCommand struct {
	Container string         `json:"container"`
	Signal    syscall.Signal `json:"signal"`
}

type NetworkInf

type NetworkInf struct {
	Device    string `json:"device"`
	IpAddress string `json:"ipAddress"`
	NetMask   string `json:"netMask"`
}

type Pod

type Pod struct {
	Hostname   string       `json:"hostname"`
	Containers []Container  `json:"containers"`
	Interfaces []NetworkInf `json:"interfaces,omitempty"`
	Dns        []string     `json:"dns,omitempty"`
	Routes     []Route      `json:"routes,omitempty"`
	ShareDir   string       `json:"shareDir"`
}

type Process

type Process struct {
	// User, Group, AdditionalGroups specify the user information
	User             string   `json:"user,omitempty"`
	Group            string   `json:"group,omitempty"`
	AdditionalGroups []string `json:"additionalGroups,omitempty"`
	// Terminal creates an interactive terminal for the process.
	Terminal bool `json:"terminal"`
	// Sequeue number for stdin and stdout
	Stdio uint64 `json:"stdio,omitempty"`
	// sequeue number for stderr if it is not shared with stdout
	Stderr uint64 `json:"stderr,omitempty"`
	// Args specifies the binary and arguments for the application to execute.
	Args []string `json:"args"`
	// Envs populates the process environment for the process.
	Envs []EnvironmentVar `json:"envs,omitempty"`
	// Workdir is the current working directory for the process and must be
	// relative to the container's root.
	Workdir string `json:"workdir"`
}

type Route

type Route struct {
	Dest    string `json:"dest"`
	Gateway string `json:"gateway,omitempty"`
	Device  string `json:"device,omitempty"`
}

type TtyMessage

type TtyMessage struct {
	Session uint64
	Message []byte
}

func (*TtyMessage) ToBuffer

func (tm *TtyMessage) ToBuffer() []byte

type VolumeDescriptor

type VolumeDescriptor struct {
	Device       string `json:"device"`
	Addr         string `json:"addr,omitempty"`
	Mount        string `json:"mount"`
	Fstype       string `json:"fstype,omitempty"`
	ReadOnly     bool   `json:"readOnly"`
	DockerVolume bool   `json:"dockerVolume"`
}

Jump to

Keyboard shortcuts

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