Documentation ¶
Index ¶
- Constants
- Variables
- type Container
- type Exec
- type Image
- type Mount
- func (*Mount) Descriptor() ([]byte, []int)deprecated
- func (x *Mount) GetDestination() string
- func (x *Mount) GetOptions() []string
- func (x *Mount) GetSource() string
- func (x *Mount) GetType() string
- func (*Mount) ProtoMessage()
- func (x *Mount) ProtoReflect() protoreflect.Message
- func (x *Mount) Reset()
- func (x *Mount) String() string
- type Runtime
- type Spec
- func (*Spec) Descriptor() ([]byte, []int)deprecated
- func (x *Spec) GetCmd() []string
- func (x *Spec) GetCwd() string
- func (x *Spec) GetEntrypoint() []string
- func (x *Spec) GetEnv() []string
- func (x *Spec) GetImage() string
- func (x *Spec) GetMounts() []*Mount
- func (x *Spec) GetPrivileged() bool
- func (*Spec) ProtoMessage()
- func (x *Spec) ProtoReflect() protoreflect.Message
- func (x *Spec) Reset()
- func (x *Spec) String() string
- type Streams
- type Volume
Constants ¶
View Source
const ( MountTypeBind = "bind" MountTypeVolume = "volume" MountTypeTmpfs = "tmpfs" )
View Source
const (
DetachKeys = "ctrl-d"
)
View Source
const (
MountOptReadOnly = "ro"
)
Variables ¶
View Source
var File_runtime_exec_proto protoreflect.FileDescriptor
View Source
var File_runtime_mount_proto protoreflect.FileDescriptor
View Source
var File_runtime_spec_proto protoreflect.FileDescriptor
View Source
var NetworkMounts = []*Mount{ { Source: crtsDir, Destination: crtsDir, Type: MountTypeBind, Options: []string{MountOptReadOnly}, }, { Source: hostsFile, Destination: hostsFile, Type: MountTypeBind, Options: []string{MountOptReadOnly}, }, { Source: resolveConf, Destination: resolveConf, Type: MountTypeBind, Options: []string{MountOptReadOnly}, }, }
View Source
var StreamsStdio = NewStreams(os.Stdin, os.Stdout, os.Stderr)
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container interface { GetID() string Exec(context.Context, *Exec, *Streams) error CopyTo(context.Context, io.Reader, string) error CopyFrom(context.Context, string) (io.ReadCloser, error) Stop(context.Context) error Remove(context.Context) error Start(context.Context) error Attach(context.Context, *Streams) error }
type Exec ¶
type Exec struct { Cmd []string `protobuf:"bytes,1,rep,name=cmd,proto3" json:"cmd,omitempty"` // contains filtered or unexported fields }
func (*Exec) Descriptor
deprecated
func (*Exec) ProtoMessage ¶
func (*Exec) ProtoMessage()
func (*Exec) ProtoReflect ¶
func (x *Exec) ProtoReflect() protoreflect.Message
type Mount ¶
type Mount struct { Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` Destination string `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"` Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` Options []string `protobuf:"bytes,4,rep,name=options,proto3" json:"options,omitempty"` // contains filtered or unexported fields }
func (*Mount) Descriptor
deprecated
func (*Mount) GetDestination ¶
func (*Mount) GetOptions ¶
func (*Mount) ProtoMessage ¶
func (*Mount) ProtoMessage()
func (*Mount) ProtoReflect ¶
func (x *Mount) ProtoReflect() protoreflect.Message
type Runtime ¶
type Runtime interface { PullImage(context.Context, string) (Image, error) PruneImages(context.Context) error CreateContainer(context.Context, *Spec) (Container, error) GetContainer(context.Context, string) (Container, error) PruneContainers(context.Context) error CreateVolume(context.Context, string) (Volume, error) GetVolume(context.Context, string) (Volume, error) PruneVolumes(context.Context) error }
type Spec ¶
type Spec struct { Image string `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"` Entrypoint []string `protobuf:"bytes,2,rep,name=entrypoint,proto3" json:"entrypoint,omitempty"` Cmd []string `protobuf:"bytes,3,rep,name=cmd,proto3" json:"cmd,omitempty"` Cwd string `protobuf:"bytes,4,opt,name=cwd,proto3" json:"cwd,omitempty"` Env []string `protobuf:"bytes,5,rep,name=env,proto3" json:"env,omitempty"` Mounts []*Mount `protobuf:"bytes,6,rep,name=mounts,proto3" json:"mounts,omitempty"` Privileged bool `protobuf:"varint,7,opt,name=privileged,proto3" json:"privileged,omitempty"` // contains filtered or unexported fields }
func (*Spec) Descriptor
deprecated
func (*Spec) GetEntrypoint ¶
func (*Spec) GetPrivileged ¶
func (*Spec) ProtoMessage ¶
func (*Spec) ProtoMessage()
func (*Spec) ProtoReflect ¶
func (x *Spec) ProtoReflect() protoreflect.Message
Source Files ¶
Click to show internal directories.
Click to hide internal directories.