api

package
v0.0.0-...-1e561f4 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

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

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

func (*ContainerDescription) GetEnvs

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

func (*ContainerDescription) GetId

func (m *ContainerDescription) GetId() string

func (*ContainerDescription) GetImage

func (m *ContainerDescription) GetImage() string

func (*ContainerDescription) GetInitialize

func (m *ContainerDescription) GetInitialize() bool

func (*ContainerDescription) GetLabels

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

func (*ContainerDescription) GetMountId

func (m *ContainerDescription) GetMountId() string

func (*ContainerDescription) GetName

func (m *ContainerDescription) GetName() string

func (*ContainerDescription) GetPath

func (m *ContainerDescription) GetPath() string

func (*ContainerDescription) GetRlimits

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

func (*ContainerDescription) GetRootPath

func (m *ContainerDescription) GetRootPath() string

func (*ContainerDescription) GetRootVolume

func (m *ContainerDescription) GetRootVolume() *VolumeDescription

func (*ContainerDescription) GetStopSignal

func (m *ContainerDescription) GetStopSignal() string

func (*ContainerDescription) GetSysctl

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

func (*ContainerDescription) GetTty

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

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"`
	Name    string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
	Lo      bool   `protobuf:"varint,3,opt,name=lo" json:"lo,omitempty"`
	Bridge  string `protobuf:"bytes,4,opt,name=bridge" json:"bridge,omitempty"`
	Ip      string `protobuf:"bytes,5,opt,name=ip" json:"ip,omitempty"`
	Mac     string `protobuf:"bytes,6,opt,name=mac" json:"mac,omitempty"`
	Mtu     uint64 `protobuf:"varint,7,opt,name=mtu" json:"mtu,omitempty"`
	Gw      string `protobuf:"bytes,8,opt,name=gw" json:"gw,omitempty"`
	TapName string `protobuf:"bytes,9,opt,name=tapName" json:"tapName,omitempty"`
	Options string `protobuf:"bytes,10,opt,name=options" json:"options,omitempty"`
}

func (*InterfaceDescription) Descriptor

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

func (*InterfaceDescription) GetBridge

func (m *InterfaceDescription) GetBridge() string

func (*InterfaceDescription) GetGw

func (m *InterfaceDescription) GetGw() string

func (*InterfaceDescription) GetId

func (m *InterfaceDescription) GetId() string

func (*InterfaceDescription) GetIp

func (m *InterfaceDescription) GetIp() string

func (*InterfaceDescription) GetLo

func (m *InterfaceDescription) GetLo() bool

func (*InterfaceDescription) GetMac

func (m *InterfaceDescription) GetMac() string

func (*InterfaceDescription) GetMtu

func (m *InterfaceDescription) GetMtu() uint64

func (*InterfaceDescription) GetName

func (m *InterfaceDescription) GetName() string

func (*InterfaceDescription) GetOptions

func (m *InterfaceDescription) GetOptions() string

func (*InterfaceDescription) GetTapName

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

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

func (*NeighborNetworks) GetInternalNetworks

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

func (m *PortDescription) GetContainerPort() int32

func (*PortDescription) GetHostPort

func (m *PortDescription) GetHostPort() int32

func (*PortDescription) GetProtocol

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

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

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

func (*Process) GetAdditionalGroup

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

func (*Process) GetArgs

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

func (*Process) GetContainer

func (m *Process) GetContainer() string

func (*Process) GetEnvs

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

func (*Process) GetGroup

func (m *Process) GetGroup() string

func (*Process) GetId

func (m *Process) GetId() string

func (*Process) GetTerminal

func (m *Process) GetTerminal() bool

func (*Process) GetUser

func (m *Process) GetUser() string

func (*Process) GetWorkdir

func (m *Process) GetWorkdir() string

func (*Process) ProtoMessage

func (*Process) ProtoMessage()

func (*Process) Reset

func (m *Process) Reset()

func (*Process) String

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

func (m *Rlimit) GetHard() uint64

func (*Rlimit) GetSoft

func (m *Rlimit) GetSoft() uint64

func (*Rlimit) GetType

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

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

func (*SandboxConfig) GetDnsOptions

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

func (*SandboxConfig) GetDnsSearch

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

func (*SandboxConfig) GetHostname

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

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

func (*UserGroupInfo) GetGroup

func (m *UserGroupInfo) GetGroup() string

func (*UserGroupInfo) GetUser

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

func (m *VolumeDescription) GetDockerVolume() bool

func (*VolumeDescription) GetFormat

func (m *VolumeDescription) GetFormat() string

func (*VolumeDescription) GetFstype

func (m *VolumeDescription) GetFstype() string

func (*VolumeDescription) GetName

func (m *VolumeDescription) GetName() string

func (*VolumeDescription) GetOptions

func (m *VolumeDescription) GetOptions() *VolumeOption

func (*VolumeDescription) GetReadOnly

func (m *VolumeDescription) GetReadOnly() bool

func (*VolumeDescription) GetSource

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

func (m *VolumeMount) GetPath() string

func (*VolumeMount) GetReadOnly

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

func (m *VolumeOption) GetBytesPerSec() int32

func (*VolumeOption) GetIops

func (m *VolumeOption) GetIops() int32

func (*VolumeOption) GetKeyring

func (m *VolumeOption) GetKeyring() string

func (*VolumeOption) GetMonitors

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

func (*VolumeOption) GetUser

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

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