Documentation
¶
Index ¶
- Variables
- type Checks
- type Cleanup
- type Config
- type DiffCreator
- type EnvdMetadata
- type Factory
- func (f *Factory) CreateSandbox(ctx context.Context, config Config, runtime RuntimeMetadata, ...) (s *Sandbox, e error)
- func (f *Factory) GetEnvdInitRequestTimeout(ctx context.Context) time.Duration
- func (f *Factory) ResumeSandbox(ctx context.Context, t template.Template, config Config, ...) (s *Sandbox, e error)
- type MemoryDiffCreator
- type Metadata
- type Metrics
- type PostInitJSONBody
- type Resources
- type RootfsDiffCreator
- type RuntimeMetadata
- type Sandbox
- func (s *Sandbox) Close(ctx context.Context) error
- func (s *Sandbox) FirecrackerVersions() fc.FirecrackerVersions
- func (s *Sandbox) LoggerMetadata() sbxlogger.SandboxMetadata
- func (s *Sandbox) Pause(ctx context.Context, m metadata.Template) (*Snapshot, error)
- func (s *Sandbox) Stop(ctx context.Context) error
- func (s *Sandbox) Wait(ctx context.Context) error
- func (s *Sandbox) WaitForEnvd(ctx context.Context, timeout time.Duration) (e error)
- func (s *Sandbox) WaitForExit(ctx context.Context) error
- type Snapshot
- type TemplateBuild
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrChecksStopped = errors.New("checks stopped")
Functions ¶
This section is empty.
Types ¶
type Checks ¶
type Checks struct { UseClickhouseMetrics bool // contains filtered or unexported fields }
func (*Checks) GetMetrics ¶
type Cleanup ¶
type Cleanup struct {
// contains filtered or unexported fields
}
func NewCleanup ¶
func NewCleanup() *Cleanup
type DiffCreator ¶
type DiffCreator interface {
// contains filtered or unexported methods
}
type EnvdMetadata ¶
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
func NewFactory ¶
func NewFactory( networkPool *network.Pool, devicePool *nbd.DevicePool, featureFlags *featureflags.Client, defaultAllowInternetAccess bool, ) *Factory
func (*Factory) CreateSandbox ¶
func (f *Factory) CreateSandbox( ctx context.Context, config Config, runtime RuntimeMetadata, fcVersions fc.FirecrackerVersions, template template.Template, sandboxTimeout time.Duration, rootfsCachePath string, processOptions fc.ProcessOptions, apiConfigToStore *orchestrator.SandboxConfig, ) (s *Sandbox, e error)
CreateSandbox creates the sandbox. IMPORTANT: You must Close() the sandbox after you are done with it.
func (*Factory) GetEnvdInitRequestTimeout ¶
func (*Factory) ResumeSandbox ¶
func (f *Factory) ResumeSandbox( ctx context.Context, t template.Template, config Config, runtime RuntimeMetadata, traceID string, startedAt time.Time, endAt time.Time, apiConfigToStore *orchestrator.SandboxConfig, ) (s *Sandbox, e error)
ResumeSandbox resumes the sandbox from already saved template or snapshot. IMPORTANT: You must Close() the sandbox after you are done with it.
type MemoryDiffCreator ¶
type MemoryDiffCreator struct {
// contains filtered or unexported fields
}
type Metrics ¶
type Metrics struct { Timestamp int64 `json:"ts"` // Unix Timestamp in UTC CPUCount int64 `json:"cpu_count"` // Total CPU cores CPUUsedPercent float64 `json:"cpu_used_pct"` // Percent rounded to 2 decimal places MemTotal int64 `json:"mem_total"` // Total virtual memory in bytes MemUsed int64 `json:"mem_used"` // Used virtual memory in bytes DiskUsed int64 `json:"disk_used"` // Used disk space in bytes DiskTotal int64 `json:"disk_total"` // Total disk space in bytes // Deprecated MemTotalMiB int64 `json:"mem_total_mib"` // Total virtual memory in MiB // Deprecated MemUsedMiB int64 `json:"mem_used_mib"` // Used virtual memory in MiB }
type PostInitJSONBody ¶
type RootfsDiffCreator ¶
type RootfsDiffCreator struct {
// contains filtered or unexported fields
}
type RuntimeMetadata ¶
type Sandbox ¶
type Sandbox struct { *Resources *Metadata Template template.Template Checks *Checks // Deprecated: to be removed in the future // It was used to store the config to allow API restarts APIStoredConfig *orchestrator.SandboxConfig // contains filtered or unexported fields }
func (*Sandbox) FirecrackerVersions ¶
func (s *Sandbox) FirecrackerVersions() fc.FirecrackerVersions
func (*Sandbox) LoggerMetadata ¶
func (s *Sandbox) LoggerMetadata() sbxlogger.SandboxMetadata
func (*Sandbox) WaitForEnvd ¶
type Snapshot ¶
type Snapshot struct { MemfileDiff build.Diff MemfileDiffHeader *header.Header RootfsDiff build.Diff RootfsDiffHeader *header.Header Snapfile template.File Metafile template.File }
func (*Snapshot) Upload ¶
func (s *Snapshot) Upload( ctx context.Context, persistence storage.StorageProvider, templateFiles storage.TemplateFiles, ) error
type TemplateBuild ¶
type TemplateBuild struct {
// contains filtered or unexported fields
}
func NewTemplateBuild ¶
func NewTemplateBuild(memfileHeader *headers.Header, rootfsHeader *headers.Header, persistence storage.StorageProvider, files storage.TemplateFiles) *TemplateBuild
Source Files
¶
Click to show internal directories.
Click to hide internal directories.