ctriface

package module
v0.0.0-...-ce9e244 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2021 License: MIT Imports: 30 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Orchestrator

type Orchestrator struct {
	// contains filtered or unexported fields
}

Orchestrator Drives all VMs

func NewOrchestrator

func NewOrchestrator(snapshotter, hostIface string, opts ...OrchestratorOption) *Orchestrator

NewOrchestrator Initializes a new orchestrator

func (*Orchestrator) Cleanup

func (o *Orchestrator) Cleanup()

Cleanup Removes the bridges created by the VM pool's tap manager Cleans up snapshots directory

func (*Orchestrator) CreateSnapshot

func (o *Orchestrator) CreateSnapshot(ctx context.Context, vmID string) error

CreateSnapshot Creates a snapshot of a VM

func (*Orchestrator) DumpUPFLatencyStats

func (o *Orchestrator) DumpUPFLatencyStats(vmID, functionName, latencyOutFilePath string) error

DumpUPFLatencyStats Dumps the memory manager's latency stats

func (*Orchestrator) DumpUPFPageStats

func (o *Orchestrator) DumpUPFPageStats(vmID, functionName, metricsOutFilePath string) error

DumpUPFPageStats Dumps the memory manager's stats about the number of the unique pages and the number of the pages that are reused across invocations

func (*Orchestrator) GetSnapshotsEnabled

func (o *Orchestrator) GetSnapshotsEnabled() bool

GetSnapshotsEnabled Returns the snapshots mode of the orchestrator

func (*Orchestrator) GetUPFEnabled

func (o *Orchestrator) GetUPFEnabled() bool

GetUPFEnabled Returns the UPF mode of the orchestrator

func (*Orchestrator) GetUPFLatencyStats

func (o *Orchestrator) GetUPFLatencyStats(vmID string) ([]*metrics.Metric, error)

GetUPFLatencyStats Returns the memory manager's latency stats

func (*Orchestrator) LoadSnapshot

func (o *Orchestrator) LoadSnapshot(ctx context.Context, vmID string) (*metrics.Metric, error)

LoadSnapshot Loads a snapshot of a VM

func (*Orchestrator) Offload

func (o *Orchestrator) Offload(ctx context.Context, vmID string) error

Offload Shuts down the VM but leaves shim and other resources running.

func (*Orchestrator) PauseVM

func (o *Orchestrator) PauseVM(ctx context.Context, vmID string) error

PauseVM Pauses a VM

func (*Orchestrator) ResumeVM

func (o *Orchestrator) ResumeVM(ctx context.Context, vmID string) (*metrics.Metric, error)

ResumeVM Resumes a VM

func (*Orchestrator) StartVM

func (o *Orchestrator) StartVM(ctx context.Context, vmID, imageName string) (_ *StartVMResponse, _ *metrics.Metric, retErr error)

StartVM Boots a VM if it does not exist

func (*Orchestrator) StopActiveVMs

func (o *Orchestrator) StopActiveVMs() error

StopActiveVMs Shuts down all active VMs

func (*Orchestrator) StopSingleVM

func (o *Orchestrator) StopSingleVM(ctx context.Context, vmID string) error

StopSingleVM Shuts down a VM Note: VMs are not quisced before being stopped

type OrchestratorOption

type OrchestratorOption func(*Orchestrator)

OrchestratorOption Options to pass to Orchestrator

func WithCustomHostIface

func WithCustomHostIface(hostIface string) OrchestratorOption

WithCustomHostIface Sets the custom host net interface for the VMs to link to

func WithLazyMode

func WithLazyMode(isLazyMode bool) OrchestratorOption

WithLazyMode Sets the lazy paging mode on (or off), where all guest memory pages are brought on demand. Only works if snapshots are enabled

func WithMetricsMode

func WithMetricsMode(isMetricsMode bool) OrchestratorOption

WithMetricsMode Sets the metrics mode

func WithSnapshots

func WithSnapshots(snapshotsEnabled bool) OrchestratorOption

WithSnapshots Sets the snapshot mode on or off

func WithSnapshotsDir

func WithSnapshotsDir(snapshotsDir string) OrchestratorOption

WithSnapshotsDir Sets the directory where snapshots should be stored

func WithTestModeOn

func WithTestModeOn(testModeOn bool) OrchestratorOption

WithTestModeOn Sets the test mode

func WithUPF

func WithUPF(isUPFEnabled bool) OrchestratorOption

WithUPF Sets the user-page faults mode on or off

type StartVMResponse

type StartVMResponse struct {
	// GuestIP is the IP of the guest MicroVM
	GuestIP string
}

StartVMResponse is the response returned by StartVM TODO: Integrate response with non-cri API

Jump to

Keyboard shortcuts

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