ctriface

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 28 Imported by: 0

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, snap *snapshotting.Snapshot) 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) GetSnapshotsDir

func (o *Orchestrator) GetSnapshotsDir() string

GetSnapshotsDir Returns the orchestrator's snapshot directory

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, snap *snapshotting.Snapshot) (_ *StartVMResponse, _ *metrics.Metric, retErr error)

LoadSnapshot Loads a snapshot of a VM

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) StartVMWithEnvironment

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

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 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 WithNetPoolSize

func WithNetPoolSize(netPoolSize int) OrchestratorOption

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

type WorkloadIoWriter

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

func NewWorkloadIoWriter

func NewWorkloadIoWriter(vmID string) WorkloadIoWriter

func (WorkloadIoWriter) Write

func (wio WorkloadIoWriter) Write(p []byte) (n int, err error)

Directories

Path Synopsis
Package ctrimages provides an image manager that manages and caches container images.
Package ctrimages provides an image manager that manages and caches container images.

Jump to

Keyboard shortcuts

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