Documentation ¶
Index ¶
- Constants
- type ContainerService
- type ImagePuller
- type ImageService
- type ItzoRuntime
- func (i *ItzoRuntime) ContainerStatus(unitName, unitImage string) (*api.UnitStatus, error)
- func (i *ItzoRuntime) CreateContainer(unit api.Unit, spec *api.PodSpec, podName string, ...) (*api.UnitStatus, error)
- func (i *ItzoRuntime) GetLogBuffer(options LogOptions) (*logbuf.LogBuffer, error)
- func (i *ItzoRuntime) GetPid(unitName string) (int, bool)
- func (i *ItzoRuntime) RemoveContainer(unit *api.Unit) error
- func (i *ItzoRuntime) RemovePodSandbox(spec *api.PodSpec) error
- func (i *ItzoRuntime) RunPodSandbox(spec *api.PodSpec) error
- func (i *ItzoRuntime) SetPodNetwork(netNS, podIP string)
- func (i *ItzoRuntime) StartContainer(unit api.Unit, podSpec *api.PodSpec, podName string) (*api.UnitStatus, error)
- func (i *ItzoRuntime) StopPodSandbox(spec *api.PodSpec) error
- func (i *ItzoRuntime) UnitRunning(unitName string) bool
- type LogOptions
- type Mounter
- type PodSandbox
- type Puller
- type RuntimeService
- type UnitRunner
Constants ¶
View Source
const ( ItzoRuntimeName = "itzo" PodmanRuntimeName = "podman" AnkaRuntimeName = "anka" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerService ¶
type ContainerService interface { CreateContainer(unit api.Unit, spec *api.PodSpec, podName string, registryCredentials map[string]api.RegistryCredentials, useOverlayfs bool) (*api.UnitStatus, error) StartContainer(unit api.Unit, spec *api.PodSpec, podName string) (*api.UnitStatus, error) RemoveContainer(unit *api.Unit) error ContainerStatus(unitName, unitImage string) (*api.UnitStatus, error) //ExecSync() //Exec() //Attach() //PortForward() // TODO:: those below are needed for server handlers, we should think about ways to remove them from this interface GetLogBuffer(options LogOptions) (*logbuf.LogBuffer, error) UnitRunning(unitName string) bool GetPid(unitName string) (int, bool) SetPodNetwork(netNS, podIP string) }
type ImagePuller ¶
type ImagePuller struct { }
func (*ImagePuller) PullImage ¶
func (ip *ImagePuller) PullImage(rootdir, name, image string, registryCredentials map[string]api.RegistryCredentials, useOverlayfs bool) error
type ImageService ¶
type ItzoRuntime ¶
type ItzoRuntime struct { metrics.ItzoMetricsProvider UnitMgr UnitRunner MountCtl Mounter ImgPuller ImageService // contains filtered or unexported fields }
func NewItzoRuntime ¶
func NewItzoRuntime(rootdir string, unitMgr UnitRunner, mounter Mounter, imgPuller ImageService) *ItzoRuntime
func (*ItzoRuntime) ContainerStatus ¶
func (i *ItzoRuntime) ContainerStatus(unitName, unitImage string) (*api.UnitStatus, error)
func (*ItzoRuntime) CreateContainer ¶
func (i *ItzoRuntime) CreateContainer(unit api.Unit, spec *api.PodSpec, podName string, registryCredentials map[string]api.RegistryCredentials, useOverlayfs bool) (*api.UnitStatus, error)
func (*ItzoRuntime) GetLogBuffer ¶
func (i *ItzoRuntime) GetLogBuffer(options LogOptions) (*logbuf.LogBuffer, error)
func (*ItzoRuntime) RemoveContainer ¶
func (i *ItzoRuntime) RemoveContainer(unit *api.Unit) error
func (*ItzoRuntime) RemovePodSandbox ¶
func (i *ItzoRuntime) RemovePodSandbox(spec *api.PodSpec) error
func (*ItzoRuntime) RunPodSandbox ¶
func (i *ItzoRuntime) RunPodSandbox(spec *api.PodSpec) error
func (*ItzoRuntime) SetPodNetwork ¶
func (i *ItzoRuntime) SetPodNetwork(netNS, podIP string)
func (*ItzoRuntime) StartContainer ¶
func (i *ItzoRuntime) StartContainer(unit api.Unit, podSpec *api.PodSpec, podName string) (*api.UnitStatus, error)
func (*ItzoRuntime) StopPodSandbox ¶
func (i *ItzoRuntime) StopPodSandbox(spec *api.PodSpec) error
func (*ItzoRuntime) UnitRunning ¶
func (i *ItzoRuntime) UnitRunning(unitName string) bool
type LogOptions ¶
This is placed in runtime package, because I'll refactor RuntimeService log functions to use this struct.
func NewLogOptionsFromURL ¶
func NewLogOptionsFromURL(logUrl *url.URL) (*LogOptions, error)
type PodSandbox ¶
type RuntimeService ¶
type RuntimeService interface { PodSandbox ContainerService metrics.MetricsProvider }
This is heavily based on Kubernetes CRI. Methods we don't really need are commented out. Having it that similar to CRI opens a door for using it in the future.
type UnitRunner ¶
type UnitRunner interface { StartUnit(string, string, string, string, string, []string, []string, []string, api.RestartPolicy) error StopUnit(string) error RemoveUnit(string) error UnitRunning(string) bool GetLogBuffer(unitName string) (*logbuf.LogBuffer, error) ReadLogBuffer(unitName string, n int) ([]logbuf.LogEntry, error) GetPid(string) (int, bool) }
Too bad there isn't a word for a creator AND destroyer Coulda gone with Shiva(er) but that's a bit imprecise...
Click to show internal directories.
Click to hide internal directories.