api

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2017 License: Apache-2.0 Imports: 7 Imported by: 11

Documentation

Overview

Package api is a generated protocol buffer package.

It is generated from these files:

descriptions.proto

It has these top-level messages:

SandboxConfig
ContainerDescription
VolumeDescription
InterfaceDescription
PortDescription
NeighborNetworks
VolumeReference
VolumeMount
VolumeOption
UserGroupInfo
Rlimit
Process

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerDescription

type ContainerDescription struct {
	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	// Static Info, got from client input
	Name  string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
	Image string `protobuf:"bytes,3,opt,name=image" json:"image,omitempty"`
	// User content or user specified behavior
	Labels     map[string]string `` /* 132-byte string literal not displayed */
	Tty        bool              `protobuf:"varint,5,opt,name=tty" json:"tty,omitempty"`
	StopSignal string            `protobuf:"bytes,6,opt,name=stopSignal" json:"stopSignal,omitempty"`
	// Creation Info, got during creation
	RootVolume *VolumeDescription `protobuf:"bytes,7,opt,name=rootVolume" json:"rootVolume,omitempty"`
	MountId    string             `protobuf:"bytes,8,opt,name=mountId" json:"mountId,omitempty"`
	RootPath   string             `protobuf:"bytes,9,opt,name=rootPath" json:"rootPath,omitempty"`
	// runtime info, combined during creation
	UGI        *UserGroupInfo              `protobuf:"bytes,10,opt,name=UGI" json:"UGI,omitempty"`
	Envs       map[string]string           `` /* 129-byte string literal not displayed */
	Workdir    string                      `protobuf:"bytes,12,opt,name=workdir" json:"workdir,omitempty"`
	Path       string                      `protobuf:"bytes,13,opt,name=path" json:"path,omitempty"`
	Args       []string                    `protobuf:"bytes,14,rep,name=args" json:"args,omitempty"`
	Rlimits    []*Rlimit                   `protobuf:"bytes,15,rep,name=rlimits" json:"rlimits,omitempty"`
	Sysctl     map[string]string           `` /* 133-byte string literal not displayed */
	Volumes    map[string]*VolumeReference `` /* 135-byte string literal not displayed */
	Initialize bool                        `protobuf:"varint,24,opt,name=initialize" json:"initialize,omitempty"`
}

func ContainerDescriptionFromOCF

func ContainerDescriptionFromOCF(id string, s *specs.Spec) *ContainerDescription

func (*ContainerDescription) Descriptor

func (*ContainerDescription) Descriptor() ([]byte, []int)

func (*ContainerDescription) GetArgs added in v1.0.0

func (m *ContainerDescription) GetArgs() []string

func (*ContainerDescription) GetEnvs

func (m *ContainerDescription) GetEnvs() map[string]string

func (*ContainerDescription) GetId added in v1.0.0

func (m *ContainerDescription) GetId() string

func (*ContainerDescription) GetImage added in v1.0.0

func (m *ContainerDescription) GetImage() string

func (*ContainerDescription) GetInitialize added in v1.0.0

func (m *ContainerDescription) GetInitialize() bool

func (*ContainerDescription) GetLabels

func (m *ContainerDescription) GetLabels() map[string]string

func (*ContainerDescription) GetMountId added in v1.0.0

func (m *ContainerDescription) GetMountId() string

func (*ContainerDescription) GetName added in v1.0.0

func (m *ContainerDescription) GetName() string

func (*ContainerDescription) GetPath added in v1.0.0

func (m *ContainerDescription) GetPath() string

func (*ContainerDescription) GetRlimits

func (m *ContainerDescription) GetRlimits() []*Rlimit

func (*ContainerDescription) GetRootPath added in v1.0.0

func (m *ContainerDescription) GetRootPath() string

func (*ContainerDescription) GetRootVolume

func (m *ContainerDescription) GetRootVolume() *VolumeDescription

func (*ContainerDescription) GetStopSignal added in v1.0.0

func (m *ContainerDescription) GetStopSignal() string

func (*ContainerDescription) GetSysctl

func (m *ContainerDescription) GetSysctl() map[string]string

func (*ContainerDescription) GetTty added in v1.0.0

func (m *ContainerDescription) GetTty() bool

func (*ContainerDescription) GetUGI

func (m *ContainerDescription) GetUGI() *UserGroupInfo

func (*ContainerDescription) GetVolumes

func (m *ContainerDescription) GetVolumes() map[string]*VolumeReference

func (*ContainerDescription) GetWorkdir added in v1.0.0

func (m *ContainerDescription) GetWorkdir() string

func (*ContainerDescription) ProtoMessage

func (*ContainerDescription) ProtoMessage()

func (*ContainerDescription) Reset

func (m *ContainerDescription) Reset()

func (*ContainerDescription) String

func (m *ContainerDescription) String() string

type InterfaceDescription

type InterfaceDescription struct {
	Id      string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	Lo      bool   `protobuf:"varint,2,opt,name=lo" json:"lo,omitempty"`
	Bridge  string `protobuf:"bytes,3,opt,name=bridge" json:"bridge,omitempty"`
	Ip      string `protobuf:"bytes,4,opt,name=ip" json:"ip,omitempty"`
	Mac     string `protobuf:"bytes,5,opt,name=mac" json:"mac,omitempty"`
	Gw      string `protobuf:"bytes,6,opt,name=gw" json:"gw,omitempty"`
	TapName string `protobuf:"bytes,7,opt,name=tapName" json:"tapName,omitempty"`
	Options string `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"`
}

func (*InterfaceDescription) Descriptor

func (*InterfaceDescription) Descriptor() ([]byte, []int)

func (*InterfaceDescription) GetBridge added in v1.0.0

func (m *InterfaceDescription) GetBridge() string

func (*InterfaceDescription) GetGw added in v1.0.0

func (m *InterfaceDescription) GetGw() string

func (*InterfaceDescription) GetId added in v1.0.0

func (m *InterfaceDescription) GetId() string

func (*InterfaceDescription) GetIp added in v1.0.0

func (m *InterfaceDescription) GetIp() string

func (*InterfaceDescription) GetLo added in v1.0.0

func (m *InterfaceDescription) GetLo() bool

func (*InterfaceDescription) GetMac added in v1.0.0

func (m *InterfaceDescription) GetMac() string

func (*InterfaceDescription) GetOptions added in v1.0.0

func (m *InterfaceDescription) GetOptions() string

func (*InterfaceDescription) GetTapName added in v1.0.0

func (m *InterfaceDescription) GetTapName() string

func (*InterfaceDescription) ProtoMessage

func (*InterfaceDescription) ProtoMessage()

func (*InterfaceDescription) Reset

func (m *InterfaceDescription) Reset()

func (*InterfaceDescription) String

func (m *InterfaceDescription) String() string

type NeighborNetworks

type NeighborNetworks struct {
	InternalNetworks []string `protobuf:"bytes,1,rep,name=internalNetworks" json:"internalNetworks,omitempty"`
	ExternalNetworks []string `protobuf:"bytes,2,rep,name=externalNetworks" json:"externalNetworks,omitempty"`
}

func (*NeighborNetworks) Descriptor

func (*NeighborNetworks) Descriptor() ([]byte, []int)

func (*NeighborNetworks) GetExternalNetworks added in v1.0.0

func (m *NeighborNetworks) GetExternalNetworks() []string

func (*NeighborNetworks) GetInternalNetworks added in v1.0.0

func (m *NeighborNetworks) GetInternalNetworks() []string

func (*NeighborNetworks) ProtoMessage

func (*NeighborNetworks) ProtoMessage()

func (*NeighborNetworks) Reset

func (m *NeighborNetworks) Reset()

func (*NeighborNetworks) String

func (m *NeighborNetworks) String() string

type PortDescription

type PortDescription struct {
	HostPort      int32  `protobuf:"varint,1,opt,name=hostPort" json:"hostPort,omitempty"`
	ContainerPort int32  `protobuf:"varint,2,opt,name=containerPort" json:"containerPort,omitempty"`
	Protocol      string `protobuf:"bytes,3,opt,name=protocol" json:"protocol,omitempty"`
}

func (*PortDescription) Descriptor

func (*PortDescription) Descriptor() ([]byte, []int)

func (*PortDescription) GetContainerPort added in v1.0.0

func (m *PortDescription) GetContainerPort() int32

func (*PortDescription) GetHostPort added in v1.0.0

func (m *PortDescription) GetHostPort() int32

func (*PortDescription) GetProtocol added in v1.0.0

func (m *PortDescription) GetProtocol() string

func (*PortDescription) ProtoMessage

func (*PortDescription) ProtoMessage()

func (*PortDescription) Reset

func (m *PortDescription) Reset()

func (*PortDescription) String

func (m *PortDescription) String() string

type Process added in v0.8.1

type Process struct {
	Container       string   `protobuf:"bytes,1,opt,name=Container" json:"Container,omitempty"`
	Id              string   `protobuf:"bytes,2,opt,name=Id" json:"Id,omitempty"`
	User            string   `protobuf:"bytes,3,opt,name=User" json:"User,omitempty"`
	Group           string   `protobuf:"bytes,4,opt,name=Group" json:"Group,omitempty"`
	AdditionalGroup []string `protobuf:"bytes,5,rep,name=AdditionalGroup" json:"AdditionalGroup,omitempty"`
	Terminal        bool     `protobuf:"varint,6,opt,name=Terminal" json:"Terminal,omitempty"`
	Args            []string `protobuf:"bytes,7,rep,name=Args" json:"Args,omitempty"`
	Envs            []string `protobuf:"bytes,8,rep,name=Envs" json:"Envs,omitempty"`
	Workdir         string   `protobuf:"bytes,9,opt,name=Workdir" json:"Workdir,omitempty"`
}

func (*Process) Descriptor added in v0.8.1

func (*Process) Descriptor() ([]byte, []int)

func (*Process) GetAdditionalGroup added in v1.0.0

func (m *Process) GetAdditionalGroup() []string

func (*Process) GetArgs added in v1.0.0

func (m *Process) GetArgs() []string

func (*Process) GetContainer added in v1.0.0

func (m *Process) GetContainer() string

func (*Process) GetEnvs added in v1.0.0

func (m *Process) GetEnvs() []string

func (*Process) GetGroup added in v1.0.0

func (m *Process) GetGroup() string

func (*Process) GetId added in v1.0.0

func (m *Process) GetId() string

func (*Process) GetTerminal added in v1.0.0

func (m *Process) GetTerminal() bool

func (*Process) GetUser added in v1.0.0

func (m *Process) GetUser() string

func (*Process) GetWorkdir added in v1.0.0

func (m *Process) GetWorkdir() string

func (*Process) ProtoMessage added in v0.8.1

func (*Process) ProtoMessage()

func (*Process) Reset added in v0.8.1

func (m *Process) Reset()

func (*Process) String added in v0.8.1

func (m *Process) String() string

type ProcessExit

type ProcessExit struct {
	Id         string
	Code       int
	FinishedAt time.Time
}

type Result

type Result interface {
	ResultId() string
	IsSuccess() bool
	Message() string
}

type ResultBase

type ResultBase struct {
	Id            string
	Success       bool
	ResultMessage string
}

func NewResultBase

func NewResultBase(id string, success bool, message string) *ResultBase

func (*ResultBase) IsSuccess

func (r *ResultBase) IsSuccess() bool

func (*ResultBase) Message

func (r *ResultBase) Message() string

func (*ResultBase) ResultId

func (r *ResultBase) ResultId() string

type Rlimit

type Rlimit struct {
	Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"`
	Hard uint64 `protobuf:"varint,2,opt,name=hard" json:"hard,omitempty"`
	Soft uint64 `protobuf:"varint,3,opt,name=soft" json:"soft,omitempty"`
}

func (*Rlimit) Descriptor

func (*Rlimit) Descriptor() ([]byte, []int)

func (*Rlimit) GetHard added in v1.0.0

func (m *Rlimit) GetHard() uint64

func (*Rlimit) GetSoft added in v1.0.0

func (m *Rlimit) GetSoft() uint64

func (*Rlimit) GetType added in v1.0.0

func (m *Rlimit) GetType() string

func (*Rlimit) ProtoMessage

func (*Rlimit) ProtoMessage()

func (*Rlimit) Reset

func (m *Rlimit) Reset()

func (*Rlimit) String

func (m *Rlimit) String() string

type SandboxConfig

type SandboxConfig struct {
	Hostname   string            `protobuf:"bytes,1,opt,name=hostname" json:"hostname,omitempty"`
	Dns        []string          `protobuf:"bytes,2,rep,name=dns" json:"dns,omitempty"`
	Neighbors  *NeighborNetworks `protobuf:"bytes,3,opt,name=neighbors" json:"neighbors,omitempty"`
	DnsOptions []string          `protobuf:"bytes,4,rep,name=dnsOptions" json:"dnsOptions,omitempty"`
	DnsSearch  []string          `protobuf:"bytes,5,rep,name=dnsSearch" json:"dnsSearch,omitempty"`
}

func SandboxInfoFromOCF

func SandboxInfoFromOCF(s *specs.Spec) *SandboxConfig

func (*SandboxConfig) Descriptor

func (*SandboxConfig) Descriptor() ([]byte, []int)

func (*SandboxConfig) GetDns added in v1.0.0

func (m *SandboxConfig) GetDns() []string

func (*SandboxConfig) GetDnsOptions added in v1.0.0

func (m *SandboxConfig) GetDnsOptions() []string

func (*SandboxConfig) GetDnsSearch added in v1.0.0

func (m *SandboxConfig) GetDnsSearch() []string

func (*SandboxConfig) GetHostname added in v1.0.0

func (m *SandboxConfig) GetHostname() string

func (*SandboxConfig) GetNeighbors

func (m *SandboxConfig) GetNeighbors() *NeighborNetworks

func (*SandboxConfig) ProtoMessage

func (*SandboxConfig) ProtoMessage()

func (*SandboxConfig) Reset

func (m *SandboxConfig) Reset()

func (*SandboxConfig) String

func (m *SandboxConfig) String() string

type SandboxHandler

type SandboxHandler interface {
}

type UserGroupInfo

type UserGroupInfo struct {
	User             string   `protobuf:"bytes,1,opt,name=user" json:"user,omitempty"`
	Group            string   `protobuf:"bytes,2,opt,name=group" json:"group,omitempty"`
	AdditionalGroups []string `protobuf:"bytes,3,rep,name=additionalGroups" json:"additionalGroups,omitempty"`
}

func UGIFromOCF

func UGIFromOCF(u *specs.User) *UserGroupInfo

func (*UserGroupInfo) Descriptor

func (*UserGroupInfo) Descriptor() ([]byte, []int)

func (*UserGroupInfo) GetAdditionalGroups added in v1.0.0

func (m *UserGroupInfo) GetAdditionalGroups() []string

func (*UserGroupInfo) GetGroup added in v1.0.0

func (m *UserGroupInfo) GetGroup() string

func (*UserGroupInfo) GetUser added in v1.0.0

func (m *UserGroupInfo) GetUser() string

func (*UserGroupInfo) ProtoMessage

func (*UserGroupInfo) ProtoMessage()

func (*UserGroupInfo) Reset

func (m *UserGroupInfo) Reset()

func (*UserGroupInfo) String

func (m *UserGroupInfo) String() string

type VolumeDescription

type VolumeDescription struct {
	Name         string        `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Source       string        `protobuf:"bytes,2,opt,name=source" json:"source,omitempty"`
	Format       string        `protobuf:"bytes,3,opt,name=format" json:"format,omitempty"`
	Fstype       string        `protobuf:"bytes,4,opt,name=fstype" json:"fstype,omitempty"`
	Options      *VolumeOption `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"`
	DockerVolume bool          `protobuf:"varint,9,opt,name=dockerVolume" json:"dockerVolume,omitempty"`
	ReadOnly     bool          `protobuf:"varint,10,opt,name=readOnly" json:"readOnly,omitempty"`
}

func (*VolumeDescription) Descriptor

func (*VolumeDescription) Descriptor() ([]byte, []int)

func (*VolumeDescription) GetDockerVolume added in v1.0.0

func (m *VolumeDescription) GetDockerVolume() bool

func (*VolumeDescription) GetFormat added in v1.0.0

func (m *VolumeDescription) GetFormat() string

func (*VolumeDescription) GetFstype added in v1.0.0

func (m *VolumeDescription) GetFstype() string

func (*VolumeDescription) GetName added in v1.0.0

func (m *VolumeDescription) GetName() string

func (*VolumeDescription) GetOptions

func (m *VolumeDescription) GetOptions() *VolumeOption

func (*VolumeDescription) GetReadOnly added in v1.0.0

func (m *VolumeDescription) GetReadOnly() bool

func (*VolumeDescription) GetSource added in v1.0.0

func (m *VolumeDescription) GetSource() string

func (*VolumeDescription) IsDir

func (v *VolumeDescription) IsDir() bool

func (*VolumeDescription) IsNas

func (v *VolumeDescription) IsNas() bool

func (*VolumeDescription) ProtoMessage

func (*VolumeDescription) ProtoMessage()

func (*VolumeDescription) Reset

func (m *VolumeDescription) Reset()

func (*VolumeDescription) String

func (m *VolumeDescription) String() string

type VolumeMount

type VolumeMount struct {
	Path     string `protobuf:"bytes,1,opt,name=path" json:"path,omitempty"`
	ReadOnly bool   `protobuf:"varint,2,opt,name=readOnly" json:"readOnly,omitempty"`
}

func (*VolumeMount) Descriptor

func (*VolumeMount) Descriptor() ([]byte, []int)

func (*VolumeMount) GetPath added in v1.0.0

func (m *VolumeMount) GetPath() string

func (*VolumeMount) GetReadOnly added in v1.0.0

func (m *VolumeMount) GetReadOnly() bool

func (*VolumeMount) ProtoMessage

func (*VolumeMount) ProtoMessage()

func (*VolumeMount) Reset

func (m *VolumeMount) Reset()

func (*VolumeMount) String

func (m *VolumeMount) String() string

type VolumeOption

type VolumeOption struct {
	User        string   `protobuf:"bytes,1,opt,name=user" json:"user,omitempty"`
	Monitors    []string `protobuf:"bytes,2,rep,name=monitors" json:"monitors,omitempty"`
	Keyring     string   `protobuf:"bytes,3,opt,name=keyring" json:"keyring,omitempty"`
	BytesPerSec int32    `protobuf:"varint,4,opt,name=bytesPerSec" json:"bytesPerSec,omitempty"`
	Iops        int32    `protobuf:"varint,5,opt,name=iops" json:"iops,omitempty"`
}

func (*VolumeOption) Descriptor

func (*VolumeOption) Descriptor() ([]byte, []int)

func (*VolumeOption) GetBytesPerSec added in v1.0.0

func (m *VolumeOption) GetBytesPerSec() int32

func (*VolumeOption) GetIops added in v1.0.0

func (m *VolumeOption) GetIops() int32

func (*VolumeOption) GetKeyring added in v1.0.0

func (m *VolumeOption) GetKeyring() string

func (*VolumeOption) GetMonitors added in v1.0.0

func (m *VolumeOption) GetMonitors() []string

func (*VolumeOption) GetUser added in v1.0.0

func (m *VolumeOption) GetUser() string

func (*VolumeOption) ProtoMessage

func (*VolumeOption) ProtoMessage()

func (*VolumeOption) Reset

func (m *VolumeOption) Reset()

func (*VolumeOption) String

func (m *VolumeOption) String() string

type VolumeReference

type VolumeReference struct {
	Name        string         `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	MountPoints []*VolumeMount `protobuf:"bytes,2,rep,name=mountPoints" json:"mountPoints,omitempty"`
}

func (*VolumeReference) Descriptor

func (*VolumeReference) Descriptor() ([]byte, []int)

func (*VolumeReference) GetMountPoints

func (m *VolumeReference) GetMountPoints() []*VolumeMount

func (*VolumeReference) GetName added in v1.0.0

func (m *VolumeReference) GetName() string

func (*VolumeReference) ProtoMessage

func (*VolumeReference) ProtoMessage()

func (*VolumeReference) Reset

func (m *VolumeReference) Reset()

func (*VolumeReference) String

func (m *VolumeReference) String() string

Jump to

Keyboard shortcuts

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