Documentation
¶
Index ¶
- type Orchestrator
- func (o *Orchestrator) Cleanup()
- func (o *Orchestrator) CreateSnapshot(ctx context.Context, vmID string, snap *snapshotting.Snapshot) error
- func (o *Orchestrator) DumpUPFLatencyStats(vmID, functionName, latencyOutFilePath string) error
- func (o *Orchestrator) DumpUPFPageStats(vmID, functionName, metricsOutFilePath string) error
- func (o *Orchestrator) GetSnapshotsDir() string
- func (o *Orchestrator) GetSnapshotsEnabled() bool
- func (o *Orchestrator) GetUPFEnabled() bool
- func (o *Orchestrator) GetUPFLatencyStats(vmID string) ([]*metrics.Metric, error)
- func (o *Orchestrator) LoadSnapshot(ctx context.Context, vmID string, snap *snapshotting.Snapshot) (_ *StartVMResponse, _ *metrics.Metric, retErr error)
- func (o *Orchestrator) PauseVM(ctx context.Context, vmID string) error
- func (o *Orchestrator) ResumeVM(ctx context.Context, vmID string) (*metrics.Metric, error)
- func (o *Orchestrator) StartVM(ctx context.Context, vmID, imageName string) (_ *StartVMResponse, _ *metrics.Metric, retErr error)
- func (o *Orchestrator) StartVMWithEnvironment(ctx context.Context, vmID, imageName string, environmentVariables []string) (_ *StartVMResponse, _ *metrics.Metric, retErr error)
- func (o *Orchestrator) StopActiveVMs() error
- func (o *Orchestrator) StopSingleVM(ctx context.Context, vmID string) error
- type OrchestratorOption
- func WithLazyMode(isLazyMode bool) OrchestratorOption
- func WithMetricsMode(isMetricsMode bool) OrchestratorOption
- func WithNetPoolSize(netPoolSize int) OrchestratorOption
- func WithSnapshots(snapshotsEnabled bool) OrchestratorOption
- func WithSnapshotsDir(snapshotsDir string) OrchestratorOption
- func WithTestModeOn(testModeOn bool) OrchestratorOption
- func WithUPF(isUPFEnabled bool) OrchestratorOption
- type StartVMResponse
- type WorkloadIoWriter
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) 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