Documentation
¶
Index ¶
- Constants
- type Balloon
- type BalloonStats
- type BalloonStatsUpdate
- type BalloonUpdate
- type BootSource
- type CPUConfig
- type CPUTemplate
- type Drive
- type EntropyDevice
- type Error
- type FirecrackerVersion
- type FullVMConfiguration
- type InstanceActionInfo
- type InstanceInfo
- type Logger
- type MachineConfiguration
- type MemoryBackend
- type Metrics
- type MmdsConfig
- type MmdsContentsObject
- type NetworkInterface
- type PartialDrive
- type PartialNetworkInterface
- func (m *PartialNetworkInterface) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (m *PartialNetworkInterface) MarshalBinary() ([]byte, error)
- func (m *PartialNetworkInterface) UnmarshalBinary(b []byte) error
- func (m *PartialNetworkInterface) Validate(formats strfmt.Registry) error
- type RateLimiter
- type SnapshotCreateParams
- type SnapshotLoadParams
- type TokenBucket
- type VM
- type Vsock
Constants ¶
const ( // DriveCacheTypeUnsafe captures enum value "Unsafe" DriveCacheTypeUnsafe string = "Unsafe" // DriveCacheTypeWriteback captures enum value "Writeback" DriveCacheTypeWriteback string = "Writeback" )
const ( // DriveIoEngineSync captures enum value "Sync" DriveIoEngineSync string = "Sync" // DriveIoEngineAsync captures enum value "Async" DriveIoEngineAsync string = "Async" )
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" // LoggerLevelTrace captures enum value "Trace" LoggerLevelTrace string = "Trace" // LoggerLevelOff captures enum value "Off" LoggerLevelOff string = "Off" )
const ( // MachineConfigurationHugePagesNone captures enum value "None" MachineConfigurationHugePagesNone string = "None" // MachineConfigurationHugePagesNr2M captures enum value "2M" MachineConfigurationHugePagesNr2M string = "2M" )
const ( // MemoryBackendBackendTypeFile captures enum value "File" MemoryBackendBackendTypeFile string = "File" // MemoryBackendBackendTypeUffd captures enum value "Uffd" MemoryBackendBackendTypeUffd string = "Uffd" )
const ( // MmdsConfigVersionV1 captures enum value "V1" MmdsConfigVersionV1 string = "V1" // MmdsConfigVersionV2 captures enum value "V2" MmdsConfigVersionV2 string = "V2" )
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) ContextValidate ¶
ContextValidate validates this balloon based on context it is used
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) ContextValidate ¶
ContextValidate validates this balloon stats based on context it is used
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, with the first statistics update scheduled immediately. Statistics cannot be turned on/off after boot.
swagger:model BalloonStatsUpdate
func (*BalloonStatsUpdate) ContextValidate ¶
ContextValidate validates this balloon stats update based on context it is used
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) ContextValidate ¶
ContextValidate validates this balloon update based on context it is used
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) ContextValidate ¶
ContextValidate validates this boot source based on context it is used
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 CPUConfig ¶
type CPUConfig string
CPUConfig The CPU configuration template defines a set of bit maps as modifiers of flags accessed by register to be disabled/enabled for the microvm.
swagger:model CpuConfig
func (CPUConfig) ContextValidate ¶
ContextValidate validates this Cpu config based on context it is used
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. This parameter has been deprecated and it will be removed in future Firecracker release.
swagger:model CpuTemplate
const ( // CPUTemplateC3 captures enum value "C3" CPUTemplateC3 CPUTemplate = "C3" // CPUTemplateT2 captures enum value "T2" CPUTemplateT2 CPUTemplate = "T2" // CPUTemplateT2S captures enum value "T2S" CPUTemplateT2S CPUTemplate = "T2S" // CPUTemplateT2CL captures enum value "T2CL" CPUTemplateT2CL CPUTemplate = "T2CL" // CPUTemplateT2A captures enum value "T2A" CPUTemplateT2A CPUTemplate = "T2A" // CPUTemplateV1N1 captures enum value "V1N1" CPUTemplateV1N1 CPUTemplate = "V1N1" // CPUTemplateNone captures enum value "None" CPUTemplateNone CPUTemplate = "None" )
func NewCPUTemplate ¶
func NewCPUTemplate(value CPUTemplate) *CPUTemplate
func (CPUTemplate) ContextValidate ¶
ContextValidate validates this Cpu template based on context it is used
func (CPUTemplate) Pointer ¶
func (m CPUTemplate) Pointer() *CPUTemplate
Pointer returns a pointer to a freshly-allocated CPUTemplate.
type Drive ¶
type Drive struct { // Represents the caching strategy for the block device. // Enum: [Unsafe Writeback] CacheType *string `json:"cache_type,omitempty"` // drive id // Required: true DriveID *string `json:"drive_id"` // Type of the IO engine used by the device. "Async" is supported on host kernels newer than 5.10.51. This field is optional for virtio-block config and should be omitted for vhost-user-block configuration. // Enum: [Sync Async] IoEngine *string `json:"io_engine,omitempty"` // Is block read only. This field is required for virtio-block config and should be omitted for vhost-user-block configuration. IsReadOnly bool `json:"is_read_only,omitempty"` // 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. This field is required for virtio-block config and should be omitted for vhost-user-block configuration. PathOnHost string `json:"path_on_host,omitempty"` // rate limiter RateLimiter *RateLimiter `json:"rate_limiter,omitempty"` // Path to the socket of vhost-user-block backend. This field is required for vhost-user-block config should be omitted for virtio-block configuration. Socket string `json:"socket,omitempty"` }
Drive drive
swagger:model Drive
func (*Drive) ContextValidate ¶
ContextValidate validate this drive based on the context it is used
func (*Drive) MarshalBinary ¶
MarshalBinary interface implementation
func (*Drive) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type EntropyDevice ¶
type EntropyDevice struct { // rate limiter RateLimiter *RateLimiter `json:"rate_limiter,omitempty"` }
EntropyDevice Defines an entropy device.
swagger:model EntropyDevice
func (*EntropyDevice) ContextValidate ¶
ContextValidate validate this entropy device based on the context it is used
func (*EntropyDevice) MarshalBinary ¶
func (m *EntropyDevice) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*EntropyDevice) UnmarshalBinary ¶
func (m *EntropyDevice) UnmarshalBinary(b []byte) error
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) ContextValidate ¶
ContextValidate validate this error based on the context it is used
func (*Error) MarshalBinary ¶
MarshalBinary interface implementation
func (*Error) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type FirecrackerVersion ¶
type FirecrackerVersion struct { // Firecracker build version. // Required: true FirecrackerVersion *string `json:"firecracker_version"` }
FirecrackerVersion Describes the Firecracker version.
swagger:model FirecrackerVersion
func (*FirecrackerVersion) ContextValidate ¶
ContextValidate validates this firecracker version based on context it is used
func (*FirecrackerVersion) MarshalBinary ¶
func (m *FirecrackerVersion) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*FirecrackerVersion) UnmarshalBinary ¶
func (m *FirecrackerVersion) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type FullVMConfiguration ¶
type FullVMConfiguration struct { // balloon Balloon *Balloon `json:"balloon,omitempty"` // boot source BootSource *BootSource `json:"boot-source,omitempty"` // Configurations for all block devices. Drives []*Drive `json:"drives"` // logger Logger *Logger `json:"logger,omitempty"` // machine config MachineConfig *MachineConfiguration `json:"machine-config,omitempty"` // metrics Metrics *Metrics `json:"metrics,omitempty"` // mmds config MmdsConfig *MmdsConfig `json:"mmds-config,omitempty"` // Configurations for all net devices. NetworkInterfaces []*NetworkInterface `json:"network-interfaces"` // vsock Vsock *Vsock `json:"vsock,omitempty"` }
FullVMConfiguration full Vm configuration
swagger:model FullVmConfiguration
func (*FullVMConfiguration) ContextValidate ¶
ContextValidate validate this full Vm configuration based on the context it is used
func (*FullVMConfiguration) MarshalBinary ¶
func (m *FullVMConfiguration) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*FullVMConfiguration) UnmarshalBinary ¶
func (m *FullVMConfiguration) UnmarshalBinary(b []byte) error
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) ContextValidate ¶
ContextValidate validates this instance action info based on context it is used
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) ContextValidate ¶
ContextValidate validates this instance info based on context it is used
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 Trace Off] Level *string `json:"level,omitempty"` // Path to the named pipe or file for the human readable log output. LogPath string `json:"log_path,omitempty"` // The module path to filter log messages by. // Example: api_server::request Module string `json:"module,omitempty"` // 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) ContextValidate ¶
ContextValidate validates this logger based on context it is used
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"` // Which huge pages configuration (if any) should be used to back guest memory. // Enum: [None 2M] HugePages string `json:"huge_pages,omitempty"` // Memory size of VM // Required: true MemSizeMib *int64 `json:"mem_size_mib"` // Flag for enabling/disabling simultaneous multithreading. Can be enabled only on x86. Smt *bool `json:"smt,omitempty"` // 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, SMT capabilities, huge page configuration and the CPU template.
swagger:model MachineConfiguration
func (*MachineConfiguration) ContextValidate ¶
ContextValidate validate this machine configuration based on the context it is used
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 MemoryBackend ¶
type MemoryBackend struct { // Based on 'backend_type' it is either 1) Path to the file that contains the guest memory to be loaded 2) Path to the UDS where a process is listening for a UFFD initialization control payload and open file descriptor that it can use to serve this process's guest memory page faults // Required: true BackendPath *string `json:"backend_path"` // backend type // Required: true // Enum: [File Uffd] BackendType *string `json:"backend_type"` }
MemoryBackend memory backend
swagger:model MemoryBackend
func (*MemoryBackend) ContextValidate ¶
ContextValidate validates this memory backend based on context it is used
func (*MemoryBackend) MarshalBinary ¶
func (m *MemoryBackend) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*MemoryBackend) UnmarshalBinary ¶
func (m *MemoryBackend) 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) ContextValidate ¶
ContextValidate validates this metrics based on context it is used
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"` // List of the network interface IDs capable of forwarding packets to the MMDS. Network interface IDs mentioned must be valid at the time of this request. The net device model will reply to HTTP GET requests sent to the MMDS address via the interfaces mentioned. In this case, both ARP requests and TCP segments heading to `ipv4_address` are intercepted by the device model, and do not reach the associated TAP device. // Required: true NetworkInterfaces []string `json:"network_interfaces"` // Enumeration indicating the MMDS version to be configured. // Enum: [V1 V2] Version *string `json:"version,omitempty"` }
MmdsConfig Defines the MMDS configuration.
swagger:model MmdsConfig
func (*MmdsConfig) ContextValidate ¶
ContextValidate validates this mmds config based on context it is used
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 MmdsContentsObject ¶
type MmdsContentsObject interface{}
MmdsContentsObject Describes the contents of MMDS in JSON format.
swagger:model MmdsContentsObject
type NetworkInterface ¶
type NetworkInterface struct { // 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) ContextValidate ¶
ContextValidate validate this network interface based on the context it is used
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. This field is optional for virtio-block config and should be omitted for vhost-user-block configuration. PathOnHost string `json:"path_on_host,omitempty"` // rate limiter RateLimiter *RateLimiter `json:"rate_limiter,omitempty"` }
PartialDrive partial drive
swagger:model PartialDrive
func (*PartialDrive) ContextValidate ¶
ContextValidate validate this partial drive based on the context it is used
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) ContextValidate ¶
func (m *PartialNetworkInterface) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validate this partial network interface based on the context it is used
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. This field is optional for virtio-block config and should be omitted for vhost-user-block configuration.
swagger:model RateLimiter
func (*RateLimiter) ContextValidate ¶
ContextValidate validate this rate limiter based on the context it is used
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"` }
SnapshotCreateParams snapshot create params
swagger:model SnapshotCreateParams
func (*SnapshotCreateParams) ContextValidate ¶
ContextValidate validates this snapshot create params based on context it is used
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"` // Configuration for the backend that handles memory load. If this field is specified, `mem_file_path` is forbidden. Either `mem_backend` or `mem_file_path` must be present at a time. MemBackend *MemoryBackend `json:"mem_backend,omitempty"` // Path to the file that contains the guest memory to be loaded. It is only allowed if `mem_backend` is not present. This parameter has been deprecated and it will be removed in future Firecracker release. MemFilePath string `json:"mem_file_path,omitempty"` // 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 Defines the configuration used for handling snapshot resume. Exactly one of the two `mem_*` fields must be present in the body of the request.
swagger:model SnapshotLoadParams
func (*SnapshotLoadParams) ContextValidate ¶
ContextValidate validate this snapshot load params based on the context it is used
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) ContextValidate ¶
ContextValidate validates this token bucket based on context it is used
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) ContextValidate ¶
ContextValidate validates this Vm based on context it is used
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"` // This parameter has been deprecated and it will be removed in future Firecracker release. VsockID string `json:"vsock_id,omitempty"` }
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) ContextValidate ¶
ContextValidate validates this vsock based on context it is used
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_config.go
- cpu_template.go
- drive.go
- entropy_device.go
- error.go
- firecracker_version.go
- full_vm_configuration.go
- instance_action_info.go
- instance_info.go
- logger.go
- machine_configuration.go
- memory_backend.go
- metrics.go
- mmds_config.go
- mmds_contents_object.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