Documentation ¶
Index ¶
- Constants
- func DeployPackage(filename, rootdir, pkgname string) (err error)
- func KillChildren()
- func MergeSecretsIntoSpec(secrets map[string]map[string][]byte, units []api.Unit)
- type EnvStore
- type Link
- type ParameterError
- type PodController
- func (pc *PodController) CreatePod(spec *api.PodSpec) error
- func (pc *PodController) GetLogBuffer(options runtime.LogOptions) (*logbuf.LogBuffer, error)
- func (pc *PodController) GetPid(unitName string) (int, bool)
- func (pc *PodController) GetStatus() ([]api.UnitStatus, []api.UnitStatus, error)
- func (pc *PodController) GetUnitName(unitName string) (string, error)
- func (pc *PodController) ReadSystemMetrics(ifname string) api.ResourceMetrics
- func (pc *PodController) ReadUnitMetrics(ifname string) api.ResourceMetrics
- func (pc *PodController) RestartPod(spec, status *api.PodSpec) error
- func (pc *PodController) RestartUnits(spec, status *api.PodSpec) ([]api.Unit, error)
- func (pc *PodController) SetPodNetwork(netNS, podIP string)
- func (pc *PodController) Start()
- func (pc *PodController) SyncPodUnits(spec *api.PodSpec, status *api.PodSpec, ...) string
- func (pc *PodController) UnitRunning(unit string) bool
- func (pc *PodController) UpdatePod(params *api.PodParameters) error
- type Server
Constants ¶
View Source
const ( UpdateTypeNoChanges = "no_changes" UpdateTypePodRestart = "pod_restart" UpdateTypePodCreate = "pod_created" UpdateTypeUnitsChange = "units_changed" UseOverlayfsAnnotationKey = "pod.elotl.co/image-overlay-rootfs" )
View Source
const ( MULTIPART_PACKAGE = "package" ITZO_DIR = "/tmp/itzo" CERTS_DIR = ITZO_DIR DEFAULT_ROOTDIR = ITZO_DIR + "/units" ITZO_VERSION = "1.0" FILE_BYTES_LIMIT = 4096 )
Variables ¶
This section is empty.
Functions ¶
func DeployPackage ¶
func KillChildren ¶ added in v1.2.0
func KillChildren()
This will ensure all the helper processes and their children get terminated before the main process exits.
Types ¶
type ParameterError ¶
type ParameterError struct {
// contains filtered or unexported fields
}
Some kind of invalid input from the user. Useful here to decide when to return a 4xx vs a 5xx.
func (*ParameterError) Error ¶
func (pe *ParameterError) Error() string
type PodController ¶
type PodController struct {
// contains filtered or unexported fields
}
I know how to do one thing: Make Controllers. A ton of controllers...
func NewPodController ¶
func NewPodController(rootdir string, runtimeName string) (*PodController, error)
func (*PodController) CreatePod ¶ added in v1.2.0
func (pc *PodController) CreatePod(spec *api.PodSpec) error
func (*PodController) GetLogBuffer ¶ added in v1.2.0
func (pc *PodController) GetLogBuffer(options runtime.LogOptions) (*logbuf.LogBuffer, error)
TODO
func (*PodController) GetPid ¶ added in v1.2.0
func (pc *PodController) GetPid(unitName string) (int, bool)
func (*PodController) GetStatus ¶
func (pc *PodController) GetStatus() ([]api.UnitStatus, []api.UnitStatus, error)
func (*PodController) GetUnitName ¶
func (pc *PodController) GetUnitName(unitName string) (string, error)
func (*PodController) ReadSystemMetrics ¶ added in v1.2.0
func (pc *PodController) ReadSystemMetrics(ifname string) api.ResourceMetrics
Metrics
These methods are just passthrough to the underlying runtime implementation
func (*PodController) ReadUnitMetrics ¶ added in v1.2.0
func (pc *PodController) ReadUnitMetrics(ifname string) api.ResourceMetrics
func (*PodController) RestartPod ¶ added in v1.2.0
func (pc *PodController) RestartPod(spec, status *api.PodSpec) error
returns: units to start, init units to start
func (*PodController) RestartUnits ¶ added in v1.2.0
func (*PodController) SetPodNetwork ¶
func (pc *PodController) SetPodNetwork(netNS, podIP string)
func (*PodController) Start ¶
func (pc *PodController) Start()
func (*PodController) SyncPodUnits ¶
func (pc *PodController) SyncPodUnits(spec *api.PodSpec, status *api.PodSpec, allCreds map[string]api.RegistryCredentials) string
func (*PodController) UnitRunning ¶ added in v1.2.0
func (pc *PodController) UnitRunning(unit string) bool
func (*PodController) UpdatePod ¶
func (pc *PodController) UpdatePod(params *api.PodParameters) error
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewTestServer ¶ added in v1.2.0
func NewTestServer(store EnvStore, rootdir string, podCtl *PodController) Server
func (*Server) ListenAndServe ¶
func (*Server) RunLogTailer ¶
Click to show internal directories.
Click to hide internal directories.