Documentation ¶
Index ¶
- Constants
- type Balloon
- type BalloonStats
- type BalloonStatsUpdate
- type BalloonUpdate
- type BootSource
- type CPUTemplate
- type Drive
- type Error
- type InstanceActionInfo
- type InstanceInfo
- type Logger
- type MachineConfiguration
- type Metrics
- type MmdsConfig
- type NetworkInterface
- type PartialDrive
- type PartialNetworkInterface
- type RateLimiter
- type SnapshotCreateParams
- type SnapshotLoadParams
- type TokenBucket
- type VM
- type Vsock
Constants ¶
const ( // InstanceActionInfoActionTypeFlushMetrics captures enum value "FlushMetrics" InstanceActionInfoActionTypeFlushMetrics string = "FlushMetrics" // InstanceActionInfoActionTypeInstanceStart captures enum value "InstanceStart" InstanceActionInfoActionTypeInstanceStart string = "InstanceStart" // InstanceActionInfoActionTypeSendCtrlAltDel captures enum value "SendCtrlAltDel" InstanceActionInfoActionTypeSendCtrlAltDel string = "SendCtrlAltDel" )
const ( // InstanceInfoStateNotStarted captures enum value "Not started" InstanceInfoStateNotStarted string = "Not started" // InstanceInfoStateRunning captures enum value "Running" InstanceInfoStateRunning string = "Running" // InstanceInfoStatePaused captures enum value "Paused" InstanceInfoStatePaused string = "Paused" )
const ( // LoggerLevelError captures enum value "Error" LoggerLevelError string = "Error" // LoggerLevelWarning captures enum value "Warning" LoggerLevelWarning string = "Warning" // LoggerLevelInfo captures enum value "Info" LoggerLevelInfo string = "Info" // LoggerLevelDebug captures enum value "Debug" LoggerLevelDebug string = "Debug" )
const ( // SnapshotCreateParamsSnapshotTypeFull captures enum value "Full" SnapshotCreateParamsSnapshotTypeFull string = "Full" // SnapshotCreateParamsSnapshotTypeDiff captures enum value "Diff" SnapshotCreateParamsSnapshotTypeDiff string = "Diff" )
const ( // VMStatePaused captures enum value "Paused" VMStatePaused string = "Paused" // VMStateResumed captures enum value "Resumed" VMStateResumed string = "Resumed" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Balloon ¶
type Balloon struct { // Target balloon size in MiB. // Required: true AmountMib *int64 `json:"amount_mib"` // Whether the balloon should deflate when the guest has memory pressure. // Required: true DeflateOnOom *bool `json:"deflate_on_oom"` // Interval in seconds between refreshing statistics. A non-zero value will enable the statistics. Defaults to 0. StatsPollingIntervals int64 `json:"stats_polling_interval_s,omitempty"` }
Balloon Balloon device descriptor. swagger:model Balloon
func (*Balloon) MarshalBinary ¶
MarshalBinary interface implementation
func (*Balloon) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type BalloonStats ¶
type BalloonStats struct { // Actual amount of memory (in MiB) the device is holding. // Required: true ActualMib *int64 `json:"actual_mib"` // Actual number of pages the device is holding. // Required: true ActualPages *int64 `json:"actual_pages"` // An estimate of how much memory is available (in bytes) for starting new applications, without pushing the system to swap. AvailableMemory int64 `json:"available_memory,omitempty"` // The amount of memory, in bytes, that can be quickly reclaimed without additional I/O. Typically these pages are used for caching files from disk. DiskCaches int64 `json:"disk_caches,omitempty"` // The amount of memory not being used for any purpose (in bytes). FreeMemory int64 `json:"free_memory,omitempty"` // The number of successful hugetlb page allocations in the guest. HugetlbAllocations int64 `json:"hugetlb_allocations,omitempty"` // The number of failed hugetlb page allocations in the guest. HugetlbFailures int64 `json:"hugetlb_failures,omitempty"` // The number of major page faults that have occurred. MajorFaults int64 `json:"major_faults,omitempty"` // The number of minor page faults that have occurred. MinorFaults int64 `json:"minor_faults,omitempty"` // The amount of memory that has been swapped in (in bytes). SwapIn int64 `json:"swap_in,omitempty"` // The amount of memory that has been swapped out to disk (in bytes). SwapOut int64 `json:"swap_out,omitempty"` // Target amount of memory (in MiB) the device aims to hold. // Required: true TargetMib *int64 `json:"target_mib"` // Target number of pages the device aims to hold. // Required: true TargetPages *int64 `json:"target_pages"` // The total amount of memory available (in bytes). TotalMemory int64 `json:"total_memory,omitempty"` }
BalloonStats Describes the balloon device statistics. swagger:model BalloonStats
func (*BalloonStats) MarshalBinary ¶
func (m *BalloonStats) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*BalloonStats) UnmarshalBinary ¶
func (m *BalloonStats) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type BalloonStatsUpdate ¶
type BalloonStatsUpdate struct { // Interval in seconds between refreshing statistics. // Required: true StatsPollingIntervals *int64 `json:"stats_polling_interval_s"` }
BalloonStatsUpdate Update the statistics polling interval. Statistics cannot be turned on/off after boot. swagger:model BalloonStatsUpdate
func (*BalloonStatsUpdate) MarshalBinary ¶
func (m *BalloonStatsUpdate) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*BalloonStatsUpdate) UnmarshalBinary ¶
func (m *BalloonStatsUpdate) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type BalloonUpdate ¶
type BalloonUpdate struct { // Target balloon size in MiB. // Required: true AmountMib *int64 `json:"amount_mib"` }
BalloonUpdate Balloon device descriptor. swagger:model BalloonUpdate
func (*BalloonUpdate) MarshalBinary ¶
func (m *BalloonUpdate) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*BalloonUpdate) UnmarshalBinary ¶
func (m *BalloonUpdate) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type BootSource ¶
type BootSource struct { // Kernel boot arguments BootArgs string `json:"boot_args,omitempty"` // Host level path to the initrd image used to boot the guest InitrdPath string `json:"initrd_path,omitempty"` // Host level path to the kernel image used to boot the guest // Required: true KernelImagePath *string `json:"kernel_image_path"` }
BootSource Boot source descriptor. swagger:model BootSource
func (*BootSource) MarshalBinary ¶
func (m *BootSource) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*BootSource) UnmarshalBinary ¶
func (m *BootSource) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type CPUTemplate ¶
type CPUTemplate string
CPUTemplate The CPU Template defines a set of flags to be disabled from the microvm so that the features exposed to the guest are the same as in the selected instance type. swagger:model CpuTemplate
const ( // CPUTemplateC3 captures enum value "C3" CPUTemplateC3 CPUTemplate = "C3" // CPUTemplateT2 captures enum value "T2" CPUTemplateT2 CPUTemplate = "T2" )
type Drive ¶
type Drive struct { // drive id // Required: true DriveID *string `json:"drive_id"` // is read only // Required: true IsReadOnly *bool `json:"is_read_only"` // is root device // Required: true IsRootDevice *bool `json:"is_root_device"` // Represents the unique id of the boot partition of this device. It is optional and it will be taken into account only if the is_root_device field is true. Partuuid string `json:"partuuid,omitempty"` // Host level path for the guest drive // Required: true PathOnHost *string `json:"path_on_host"` // rate limiter RateLimiter *RateLimiter `json:"rate_limiter,omitempty"` }
Drive drive swagger:model Drive
func (*Drive) MarshalBinary ¶
MarshalBinary interface implementation
func (*Drive) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Error ¶
type Error struct { // A description of the error condition // Read Only: true FaultMessage string `json:"fault_message,omitempty"` }
Error error swagger:model Error
func (*Error) MarshalBinary ¶
MarshalBinary interface implementation
func (*Error) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type InstanceActionInfo ¶
type InstanceActionInfo struct { // Enumeration indicating what type of action is contained in the payload // Required: true // Enum: [FlushMetrics InstanceStart SendCtrlAltDel] ActionType *string `json:"action_type"` }
InstanceActionInfo Variant wrapper containing the real action. swagger:model InstanceActionInfo
func (*InstanceActionInfo) MarshalBinary ¶
func (m *InstanceActionInfo) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*InstanceActionInfo) UnmarshalBinary ¶
func (m *InstanceActionInfo) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type InstanceInfo ¶
type InstanceInfo struct { // Application name. // Required: true AppName *string `json:"app_name"` // MicroVM / instance ID. // Required: true ID *string `json:"id"` // The current detailed state (Not started, Running, Paused) of the Firecracker instance. This value is read-only for the control-plane. // Required: true // Enum: [Not started Running Paused] State *string `json:"state"` // MicroVM hypervisor build version. // Required: true VmmVersion *string `json:"vmm_version"` }
InstanceInfo Describes MicroVM instance information. swagger:model InstanceInfo
func (*InstanceInfo) MarshalBinary ¶
func (m *InstanceInfo) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*InstanceInfo) UnmarshalBinary ¶
func (m *InstanceInfo) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Logger ¶
type Logger struct { // Set the level. The possible values are case-insensitive. // Enum: [Error Warning Info Debug] Level *string `json:"level,omitempty"` // Path to the named pipe or file for the human readable log output. // Required: true LogPath *string `json:"log_path"` // Whether or not to output the level in the logs. ShowLevel *bool `json:"show_level,omitempty"` // Whether or not to include the file path and line number of the log's origin. ShowLogOrigin *bool `json:"show_log_origin,omitempty"` }
Logger Describes the configuration option for the logging capability. swagger:model Logger
func (*Logger) MarshalBinary ¶
MarshalBinary interface implementation
func (*Logger) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type MachineConfiguration ¶
type MachineConfiguration struct { // cpu template CPUTemplate CPUTemplate `json:"cpu_template,omitempty"` // Flag for enabling/disabling Hyperthreading // Required: true HtEnabled *bool `json:"ht_enabled"` // Memory size of VM // Required: true MemSizeMib *int64 `json:"mem_size_mib"` // Enable dirty page tracking. If this is enabled, then incremental guest memory snapshots can be created. These belong to diff snapshots, which contain, besides the microVM state, only the memory dirtied since a previous snapshot. Full snapshots each contain a full copy of the guest memory. TrackDirtyPages bool `json:"track_dirty_pages,omitempty"` // Number of vCPUs (either 1 or an even number) // Required: true // Maximum: 32 // Minimum: 1 VcpuCount *int64 `json:"vcpu_count"` }
MachineConfiguration Describes the number of vCPUs, memory size, Hyperthreading capabilities and the CPU template. swagger:model MachineConfiguration
func (*MachineConfiguration) MarshalBinary ¶
func (m *MachineConfiguration) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*MachineConfiguration) UnmarshalBinary ¶
func (m *MachineConfiguration) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Metrics ¶
type Metrics struct { // Path to the named pipe or file where the JSON-formatted metrics are flushed. // Required: true MetricsPath *string `json:"metrics_path"` }
Metrics Describes the configuration option for the metrics capability. swagger:model Metrics
func (*Metrics) MarshalBinary ¶
MarshalBinary interface implementation
func (*Metrics) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type MmdsConfig ¶
type MmdsConfig struct { // A valid IPv4 link-local address. IPV4Address *string `json:"ipv4_address,omitempty"` }
MmdsConfig Defines the MMDS configuration. swagger:model MmdsConfig
func (*MmdsConfig) MarshalBinary ¶
func (m *MmdsConfig) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*MmdsConfig) UnmarshalBinary ¶
func (m *MmdsConfig) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type NetworkInterface ¶
type NetworkInterface struct { // If this field is set, the device model will reply to HTTP GET requests sent to the MMDS address via this interface. In this case, both ARP requests for 169.254.169.254 and TCP segments heading to the same address are intercepted by the device model, and do not reach the associated TAP device. AllowMmdsRequests bool `json:"allow_mmds_requests,omitempty"` // guest mac GuestMac string `json:"guest_mac,omitempty"` // Host level path for the guest network interface // Required: true HostDevName *string `json:"host_dev_name"` // iface id // Required: true IfaceID *string `json:"iface_id"` // rx rate limiter RxRateLimiter *RateLimiter `json:"rx_rate_limiter,omitempty"` // tx rate limiter TxRateLimiter *RateLimiter `json:"tx_rate_limiter,omitempty"` }
NetworkInterface Defines a network interface. swagger:model NetworkInterface
func (*NetworkInterface) MarshalBinary ¶
func (m *NetworkInterface) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*NetworkInterface) UnmarshalBinary ¶
func (m *NetworkInterface) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PartialDrive ¶
type PartialDrive struct { // drive id // Required: true DriveID *string `json:"drive_id"` // Host level path for the guest drive PathOnHost string `json:"path_on_host,omitempty"` // rate limiter RateLimiter *RateLimiter `json:"rate_limiter,omitempty"` }
PartialDrive partial drive swagger:model PartialDrive
func (*PartialDrive) MarshalBinary ¶
func (m *PartialDrive) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PartialDrive) UnmarshalBinary ¶
func (m *PartialDrive) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PartialNetworkInterface ¶
type PartialNetworkInterface struct { // iface id // Required: true IfaceID *string `json:"iface_id"` // rx rate limiter RxRateLimiter *RateLimiter `json:"rx_rate_limiter,omitempty"` // tx rate limiter TxRateLimiter *RateLimiter `json:"tx_rate_limiter,omitempty"` }
PartialNetworkInterface Defines a partial network interface structure, used to update the rate limiters for that interface, after microvm start. swagger:model PartialNetworkInterface
func (*PartialNetworkInterface) MarshalBinary ¶
func (m *PartialNetworkInterface) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PartialNetworkInterface) UnmarshalBinary ¶
func (m *PartialNetworkInterface) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type RateLimiter ¶
type RateLimiter struct { // Token bucket with bytes as tokens Bandwidth *TokenBucket `json:"bandwidth,omitempty"` // Token bucket with operations as tokens Ops *TokenBucket `json:"ops,omitempty"` }
RateLimiter Defines an IO rate limiter with independent bytes/s and ops/s limits. Limits are defined by configuring each of the _bandwidth_ and _ops_ token buckets. swagger:model RateLimiter
func (*RateLimiter) MarshalBinary ¶
func (m *RateLimiter) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*RateLimiter) UnmarshalBinary ¶
func (m *RateLimiter) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type SnapshotCreateParams ¶
type SnapshotCreateParams struct { // Path to the file that will contain the guest memory. // Required: true MemFilePath *string `json:"mem_file_path"` // Path to the file that will contain the microVM state. // Required: true SnapshotPath *string `json:"snapshot_path"` // Type of snapshot to create. It is optional and by default, a full snapshot is created. // Enum: [Full Diff] SnapshotType string `json:"snapshot_type,omitempty"` // The microVM version for which we want to create the snapshot. It is optional and it defaults to the current version. Version string `json:"version,omitempty"` }
SnapshotCreateParams snapshot create params swagger:model SnapshotCreateParams
func (*SnapshotCreateParams) MarshalBinary ¶
func (m *SnapshotCreateParams) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SnapshotCreateParams) UnmarshalBinary ¶
func (m *SnapshotCreateParams) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type SnapshotLoadParams ¶
type SnapshotLoadParams struct { // Enable support for incremental (diff) snapshots by tracking dirty guest pages. EnableDiffSnapshots bool `json:"enable_diff_snapshots,omitempty"` // Path to the file that contains the guest memory to be loaded. // Required: true MemFilePath *string `json:"mem_file_path"` // When set to true, the vm is also resumed if the snapshot load is successful. ResumeVM bool `json:"resume_vm,omitempty"` // Path to the file that contains the microVM state to be loaded. // Required: true SnapshotPath *string `json:"snapshot_path"` }
SnapshotLoadParams snapshot load params swagger:model SnapshotLoadParams
func (*SnapshotLoadParams) MarshalBinary ¶
func (m *SnapshotLoadParams) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SnapshotLoadParams) UnmarshalBinary ¶
func (m *SnapshotLoadParams) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type TokenBucket ¶
type TokenBucket struct { // The initial size of a token bucket. // Minimum: 0 OneTimeBurst *int64 `json:"one_time_burst,omitempty"` // The amount of milliseconds it takes for the bucket to refill. // Required: true // Minimum: 0 RefillTime *int64 `json:"refill_time"` // The total number of tokens this bucket can hold. // Required: true // Minimum: 0 Size *int64 `json:"size"` }
TokenBucket Defines a token bucket with a maximum capacity (size), an initial burst size (one_time_burst) and an interval for refilling purposes (refill_time). The refill-rate is derived from size and refill_time, and it is the constant rate at which the tokens replenish. The refill process only starts happening after the initial burst budget is consumed. Consumption from the token bucket is unbounded in speed which allows for bursts bound in size by the amount of tokens available. Once the token bucket is empty, consumption speed is bound by the refill_rate. swagger:model TokenBucket
func (*TokenBucket) MarshalBinary ¶
func (m *TokenBucket) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*TokenBucket) UnmarshalBinary ¶
func (m *TokenBucket) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type VM ¶
type VM struct { // state // Required: true // Enum: [Paused Resumed] State *string `json:"state"` }
VM Defines the microVM running state. It is especially useful in the snapshotting context. swagger:model Vm
func (*VM) MarshalBinary ¶
MarshalBinary interface implementation
func (*VM) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Vsock ¶
type Vsock struct { // Guest Vsock CID // Required: true // Minimum: 3 GuestCid *int64 `json:"guest_cid"` // Path to UNIX domain socket, used to proxy vsock connections. // Required: true UdsPath *string `json:"uds_path"` // vsock id // Required: true VsockID *string `json:"vsock_id"` }
Vsock Defines a vsock device, backed by a set of Unix Domain Sockets, on the host side. For host-initiated connections, Firecracker will be listening on the Unix socket identified by the path `uds_path`. Firecracker will create this socket, bind and listen on it. Host-initiated connections will be performed by connection to this socket and issuing a connection forwarding request to the desired guest-side vsock port (i.e. `CONNECT 52\n`, to connect to port 52). For guest-initiated connections, Firecracker will expect host software to be bound and listening on Unix sockets at `uds_path_<PORT>`. E.g. "/path/to/host_vsock.sock_52" for port number 52. swagger:model Vsock
func (*Vsock) MarshalBinary ¶
MarshalBinary interface implementation
func (*Vsock) UnmarshalBinary ¶
UnmarshalBinary interface implementation
Source Files ¶
- balloon.go
- balloon_stats.go
- balloon_stats_update.go
- balloon_update.go
- boot_source.go
- cpu_template.go
- drive.go
- error.go
- instance_action_info.go
- instance_info.go
- logger.go
- machine_configuration.go
- metrics.go
- mmds_config.go
- network_interface.go
- partial_drive.go
- partial_network_interface.go
- rate_limiter.go
- snapshot_create_params.go
- snapshot_load_params.go
- token_bucket.go
- vm.go
- vsock.go