Documentation ¶
Overview ¶
Code generated by ogen, DO NOT EDIT.
Index ¶
- func WithServerURL(ctx context.Context, u *url.URL) context.Context
- type Balloon
- func (s *Balloon) Decode(d *jx.Decoder) error
- func (s *Balloon) Encode(e *jx.Encoder)
- func (s *Balloon) GetAmountMib() int
- func (s *Balloon) GetDeflateOnOom() bool
- func (s *Balloon) GetStatsPollingIntervalS() OptInt
- func (s *Balloon) MarshalJSON() ([]byte, error)
- func (s *Balloon) SetAmountMib(val int)
- func (s *Balloon) SetDeflateOnOom(val bool)
- func (s *Balloon) SetFake()
- func (s *Balloon) SetStatsPollingIntervalS(val OptInt)
- func (s *Balloon) UnmarshalJSON(data []byte) error
- type BalloonStats
- func (s *BalloonStats) Decode(d *jx.Decoder) error
- func (s *BalloonStats) Encode(e *jx.Encoder)
- func (s *BalloonStats) GetActualMib() int
- func (s *BalloonStats) GetActualPages() int
- func (s *BalloonStats) GetAvailableMemory() OptInt64
- func (s *BalloonStats) GetDiskCaches() OptInt64
- func (s *BalloonStats) GetFreeMemory() OptInt64
- func (s *BalloonStats) GetHugetlbAllocations() OptInt64
- func (s *BalloonStats) GetHugetlbFailures() OptInt64
- func (s *BalloonStats) GetMajorFaults() OptInt64
- func (s *BalloonStats) GetMinorFaults() OptInt64
- func (s *BalloonStats) GetSwapIn() OptInt64
- func (s *BalloonStats) GetSwapOut() OptInt64
- func (s *BalloonStats) GetTargetMib() int
- func (s *BalloonStats) GetTargetPages() int
- func (s *BalloonStats) GetTotalMemory() OptInt64
- func (s *BalloonStats) MarshalJSON() ([]byte, error)
- func (s *BalloonStats) SetActualMib(val int)
- func (s *BalloonStats) SetActualPages(val int)
- func (s *BalloonStats) SetAvailableMemory(val OptInt64)
- func (s *BalloonStats) SetDiskCaches(val OptInt64)
- func (s *BalloonStats) SetFake()
- func (s *BalloonStats) SetFreeMemory(val OptInt64)
- func (s *BalloonStats) SetHugetlbAllocations(val OptInt64)
- func (s *BalloonStats) SetHugetlbFailures(val OptInt64)
- func (s *BalloonStats) SetMajorFaults(val OptInt64)
- func (s *BalloonStats) SetMinorFaults(val OptInt64)
- func (s *BalloonStats) SetSwapIn(val OptInt64)
- func (s *BalloonStats) SetSwapOut(val OptInt64)
- func (s *BalloonStats) SetTargetMib(val int)
- func (s *BalloonStats) SetTargetPages(val int)
- func (s *BalloonStats) SetTotalMemory(val OptInt64)
- func (s *BalloonStats) UnmarshalJSON(data []byte) error
- type BalloonStatsUpdate
- func (s *BalloonStatsUpdate) Decode(d *jx.Decoder) error
- func (s *BalloonStatsUpdate) Encode(e *jx.Encoder)
- func (s *BalloonStatsUpdate) GetStatsPollingIntervalS() int
- func (s *BalloonStatsUpdate) MarshalJSON() ([]byte, error)
- func (s *BalloonStatsUpdate) SetFake()
- func (s *BalloonStatsUpdate) SetStatsPollingIntervalS(val int)
- func (s *BalloonStatsUpdate) UnmarshalJSON(data []byte) error
- type BalloonUpdate
- func (s *BalloonUpdate) Decode(d *jx.Decoder) error
- func (s *BalloonUpdate) Encode(e *jx.Encoder)
- func (s *BalloonUpdate) GetAmountMib() int
- func (s *BalloonUpdate) MarshalJSON() ([]byte, error)
- func (s *BalloonUpdate) SetAmountMib(val int)
- func (s *BalloonUpdate) SetFake()
- func (s *BalloonUpdate) UnmarshalJSON(data []byte) error
- type BootSource
- func (s *BootSource) Decode(d *jx.Decoder) error
- func (s *BootSource) Encode(e *jx.Encoder)
- func (s *BootSource) GetBootArgs() OptString
- func (s *BootSource) GetInitrdPath() OptString
- func (s *BootSource) GetKernelImagePath() string
- func (s *BootSource) MarshalJSON() ([]byte, error)
- func (s *BootSource) SetBootArgs(val OptString)
- func (s *BootSource) SetFake()
- func (s *BootSource) SetInitrdPath(val OptString)
- func (s *BootSource) SetKernelImagePath(val string)
- func (s *BootSource) UnmarshalJSON(data []byte) error
- type Client
- func (c *Client) CreateSnapshot(ctx context.Context, request *SnapshotCreateParams) (CreateSnapshotRes, error)
- func (c *Client) CreateSyncAction(ctx context.Context, request *InstanceActionInfo) (CreateSyncActionRes, error)
- func (c *Client) DescribeBalloonConfig(ctx context.Context) (DescribeBalloonConfigRes, error)
- func (c *Client) DescribeBalloonStats(ctx context.Context) (DescribeBalloonStatsRes, error)
- func (c *Client) DescribeInstance(ctx context.Context) (*InstanceInfo, error)
- func (c *Client) GetExportVmConfig(ctx context.Context) (*FullVmConfiguration, error)
- func (c *Client) GetMachineConfiguration(ctx context.Context) (*MachineConfiguration, error)
- func (c *Client) LoadSnapshot(ctx context.Context, request *SnapshotLoadParams) (LoadSnapshotRes, error)
- func (c *Client) MmdsConfigPut(ctx context.Context, request *MmdsConfig) (MmdsConfigPutRes, error)
- func (c *Client) MmdsGet(ctx context.Context) (MmdsGetRes, error)
- func (c *Client) MmdsPatch(ctx context.Context, request *MmdsPatchReq) (MmdsPatchRes, error)
- func (c *Client) MmdsPut(ctx context.Context, request *MmdsPutReq) (MmdsPutRes, error)
- func (c *Client) PatchBalloon(ctx context.Context, request *BalloonUpdate) (PatchBalloonRes, error)
- func (c *Client) PatchBalloonStatsInterval(ctx context.Context, request *BalloonStatsUpdate) (PatchBalloonStatsIntervalRes, error)
- func (c *Client) PatchGuestDriveByID(ctx context.Context, request *PartialDrive, params PatchGuestDriveByIDParams) (PatchGuestDriveByIDRes, error)
- func (c *Client) PatchGuestNetworkInterfaceByID(ctx context.Context, request *PartialNetworkInterface, ...) (PatchGuestNetworkInterfaceByIDRes, error)
- func (c *Client) PatchMachineConfiguration(ctx context.Context, request OptMachineConfiguration) (PatchMachineConfigurationRes, error)
- func (c *Client) PatchVm(ctx context.Context, request *VM) (PatchVmRes, error)
- func (c *Client) PutBalloon(ctx context.Context, request *Balloon) (PutBalloonRes, error)
- func (c *Client) PutGuestBootSource(ctx context.Context, request *BootSource) (PutGuestBootSourceRes, error)
- func (c *Client) PutGuestDriveByID(ctx context.Context, request *Drive, params PutGuestDriveByIDParams) (PutGuestDriveByIDRes, error)
- func (c *Client) PutGuestNetworkInterfaceByID(ctx context.Context, request *NetworkInterface, ...) (PutGuestNetworkInterfaceByIDRes, error)
- func (c *Client) PutGuestVsock(ctx context.Context, request *Vsock) (PutGuestVsockRes, error)
- func (c *Client) PutLogger(ctx context.Context, request *Logger) (PutLoggerRes, error)
- func (c *Client) PutMachineConfiguration(ctx context.Context, request OptMachineConfiguration) (PutMachineConfigurationRes, error)
- func (c *Client) PutMetrics(ctx context.Context, request *Metrics) (PutMetricsRes, error)
- type ClientOption
- type CpuTemplate
- func (CpuTemplate) AllValues() []CpuTemplate
- func (s *CpuTemplate) Decode(d *jx.Decoder) error
- func (s CpuTemplate) Encode(e *jx.Encoder)
- func (s CpuTemplate) MarshalJSON() ([]byte, error)
- func (s CpuTemplate) MarshalText() ([]byte, error)
- func (s *CpuTemplate) SetFake()
- func (s *CpuTemplate) UnmarshalJSON(data []byte) error
- func (s *CpuTemplate) UnmarshalText(data []byte) error
- func (s CpuTemplate) Validate() error
- type CreateSnapshotNoContent
- type CreateSnapshotRes
- type CreateSyncActionNoContent
- type CreateSyncActionRes
- type DescribeBalloonConfigRes
- type DescribeBalloonStatsRes
- type Drive
- func (s *Drive) Decode(d *jx.Decoder) error
- func (s *Drive) Encode(e *jx.Encoder)
- func (s *Drive) GetCacheType() OptString
- func (s *Drive) GetDriveID() string
- func (s *Drive) GetIsReadOnly() bool
- func (s *Drive) GetIsRootDevice() bool
- func (s *Drive) GetPartuuid() OptString
- func (s *Drive) GetPathOnHost() string
- func (s *Drive) GetRateLimiter() OptRateLimiter
- func (s *Drive) MarshalJSON() ([]byte, error)
- func (s *Drive) SetCacheType(val OptString)
- func (s *Drive) SetDriveID(val string)
- func (s *Drive) SetFake()
- func (s *Drive) SetIsReadOnly(val bool)
- func (s *Drive) SetIsRootDevice(val bool)
- func (s *Drive) SetPartuuid(val OptString)
- func (s *Drive) SetPathOnHost(val string)
- func (s *Drive) SetRateLimiter(val OptRateLimiter)
- func (s *Drive) UnmarshalJSON(data []byte) error
- func (s *Drive) Validate() error
- type Error
- type ErrorHandler
- type ErrorStatusCode
- type FullVmConfiguration
- func (s *FullVmConfiguration) Decode(d *jx.Decoder) error
- func (s *FullVmConfiguration) Encode(e *jx.Encoder)
- func (s *FullVmConfiguration) GetBalloonDevice() OptBalloon
- func (s *FullVmConfiguration) GetBlockDevices() []Drive
- func (s *FullVmConfiguration) GetBootSource() OptBootSource
- func (s *FullVmConfiguration) GetLogger() OptLogger
- func (s *FullVmConfiguration) GetMachineConfig() OptMachineConfiguration
- func (s *FullVmConfiguration) GetMetrics() OptMetrics
- func (s *FullVmConfiguration) GetMmdsConfig() OptMmdsConfig
- func (s *FullVmConfiguration) GetNetDevices() []NetworkInterface
- func (s *FullVmConfiguration) GetVsockDevice() OptVsock
- func (s *FullVmConfiguration) MarshalJSON() ([]byte, error)
- func (s *FullVmConfiguration) SetBalloonDevice(val OptBalloon)
- func (s *FullVmConfiguration) SetBlockDevices(val []Drive)
- func (s *FullVmConfiguration) SetBootSource(val OptBootSource)
- func (s *FullVmConfiguration) SetFake()
- func (s *FullVmConfiguration) SetLogger(val OptLogger)
- func (s *FullVmConfiguration) SetMachineConfig(val OptMachineConfiguration)
- func (s *FullVmConfiguration) SetMetrics(val OptMetrics)
- func (s *FullVmConfiguration) SetMmdsConfig(val OptMmdsConfig)
- func (s *FullVmConfiguration) SetNetDevices(val []NetworkInterface)
- func (s *FullVmConfiguration) SetVsockDevice(val OptVsock)
- func (s *FullVmConfiguration) UnmarshalJSON(data []byte) error
- func (s *FullVmConfiguration) Validate() error
- type Handler
- type InstanceActionInfo
- func (s *InstanceActionInfo) Decode(d *jx.Decoder) error
- func (s *InstanceActionInfo) Encode(e *jx.Encoder)
- func (s *InstanceActionInfo) GetActionType() InstanceActionInfoActionType
- func (s *InstanceActionInfo) MarshalJSON() ([]byte, error)
- func (s *InstanceActionInfo) SetActionType(val InstanceActionInfoActionType)
- func (s *InstanceActionInfo) SetFake()
- func (s *InstanceActionInfo) UnmarshalJSON(data []byte) error
- func (s *InstanceActionInfo) Validate() error
- type InstanceActionInfoActionType
- func (InstanceActionInfoActionType) AllValues() []InstanceActionInfoActionType
- func (s *InstanceActionInfoActionType) Decode(d *jx.Decoder) error
- func (s InstanceActionInfoActionType) Encode(e *jx.Encoder)
- func (s InstanceActionInfoActionType) MarshalJSON() ([]byte, error)
- func (s InstanceActionInfoActionType) MarshalText() ([]byte, error)
- func (s *InstanceActionInfoActionType) SetFake()
- func (s *InstanceActionInfoActionType) UnmarshalJSON(data []byte) error
- func (s *InstanceActionInfoActionType) UnmarshalText(data []byte) error
- func (s InstanceActionInfoActionType) Validate() error
- type InstanceInfo
- func (s *InstanceInfo) Decode(d *jx.Decoder) error
- func (s *InstanceInfo) Encode(e *jx.Encoder)
- func (s *InstanceInfo) GetAppName() string
- func (s *InstanceInfo) GetID() string
- func (s *InstanceInfo) GetState() InstanceInfoState
- func (s *InstanceInfo) GetVmmVersion() string
- func (s *InstanceInfo) MarshalJSON() ([]byte, error)
- func (s *InstanceInfo) SetAppName(val string)
- func (s *InstanceInfo) SetFake()
- func (s *InstanceInfo) SetID(val string)
- func (s *InstanceInfo) SetState(val InstanceInfoState)
- func (s *InstanceInfo) SetVmmVersion(val string)
- func (s *InstanceInfo) UnmarshalJSON(data []byte) error
- func (s *InstanceInfo) Validate() error
- type InstanceInfoState
- func (InstanceInfoState) AllValues() []InstanceInfoState
- func (s *InstanceInfoState) Decode(d *jx.Decoder) error
- func (s InstanceInfoState) Encode(e *jx.Encoder)
- func (s InstanceInfoState) MarshalJSON() ([]byte, error)
- func (s InstanceInfoState) MarshalText() ([]byte, error)
- func (s *InstanceInfoState) SetFake()
- func (s *InstanceInfoState) UnmarshalJSON(data []byte) error
- func (s *InstanceInfoState) UnmarshalText(data []byte) error
- func (s InstanceInfoState) Validate() error
- type Invoker
- type LoadSnapshotNoContent
- type LoadSnapshotRes
- type Logger
- func (s *Logger) Decode(d *jx.Decoder) error
- func (s *Logger) Encode(e *jx.Encoder)
- func (s *Logger) GetLevel() OptLoggerLevel
- func (s *Logger) GetLogPath() string
- func (s *Logger) GetShowLevel() OptBool
- func (s *Logger) GetShowLogOrigin() OptBool
- func (s *Logger) MarshalJSON() ([]byte, error)
- func (s *Logger) SetFake()
- func (s *Logger) SetLevel(val OptLoggerLevel)
- func (s *Logger) SetLogPath(val string)
- func (s *Logger) SetShowLevel(val OptBool)
- func (s *Logger) SetShowLogOrigin(val OptBool)
- func (s *Logger) UnmarshalJSON(data []byte) error
- func (s *Logger) Validate() error
- type LoggerLevel
- func (LoggerLevel) AllValues() []LoggerLevel
- func (s *LoggerLevel) Decode(d *jx.Decoder) error
- func (s LoggerLevel) Encode(e *jx.Encoder)
- func (s LoggerLevel) MarshalJSON() ([]byte, error)
- func (s LoggerLevel) MarshalText() ([]byte, error)
- func (s *LoggerLevel) SetFake()
- func (s *LoggerLevel) UnmarshalJSON(data []byte) error
- func (s *LoggerLevel) UnmarshalText(data []byte) error
- func (s LoggerLevel) Validate() error
- type MachineConfiguration
- func (s *MachineConfiguration) Decode(d *jx.Decoder) error
- func (s *MachineConfiguration) Encode(e *jx.Encoder)
- func (s *MachineConfiguration) GetCPUTemplate() OptCpuTemplate
- func (s *MachineConfiguration) GetHtEnabled() bool
- func (s *MachineConfiguration) GetMemSizeMib() int
- func (s *MachineConfiguration) GetTrackDirtyPages() OptBool
- func (s *MachineConfiguration) GetVcpuCount() int
- func (s *MachineConfiguration) MarshalJSON() ([]byte, error)
- func (s *MachineConfiguration) SetCPUTemplate(val OptCpuTemplate)
- func (s *MachineConfiguration) SetFake()
- func (s *MachineConfiguration) SetHtEnabled(val bool)
- func (s *MachineConfiguration) SetMemSizeMib(val int)
- func (s *MachineConfiguration) SetTrackDirtyPages(val OptBool)
- func (s *MachineConfiguration) SetVcpuCount(val int)
- func (s *MachineConfiguration) UnmarshalJSON(data []byte) error
- func (s *MachineConfiguration) Validate() error
- type Metrics
- type Middleware
- type MmdsConfig
- func (s *MmdsConfig) Decode(d *jx.Decoder) error
- func (s *MmdsConfig) Encode(e *jx.Encoder)
- func (s *MmdsConfig) GetIpv4Address() OptString
- func (s *MmdsConfig) MarshalJSON() ([]byte, error)
- func (s *MmdsConfig) SetFake()
- func (s *MmdsConfig) SetIpv4Address(val OptString)
- func (s *MmdsConfig) UnmarshalJSON(data []byte) error
- type MmdsConfigPutNoContent
- type MmdsConfigPutRes
- type MmdsGetOK
- type MmdsGetRes
- type MmdsPatchNoContent
- type MmdsPatchReq
- type MmdsPatchRes
- type MmdsPutNoContent
- type MmdsPutReq
- type MmdsPutRes
- type NetworkInterface
- func (s *NetworkInterface) Decode(d *jx.Decoder) error
- func (s *NetworkInterface) Encode(e *jx.Encoder)
- func (s *NetworkInterface) GetAllowMmdsRequests() OptBool
- func (s *NetworkInterface) GetGuestMAC() OptString
- func (s *NetworkInterface) GetHostDevName() string
- func (s *NetworkInterface) GetIfaceID() string
- func (s *NetworkInterface) GetRxRateLimiter() OptRateLimiter
- func (s *NetworkInterface) GetTxRateLimiter() OptRateLimiter
- func (s *NetworkInterface) MarshalJSON() ([]byte, error)
- func (s *NetworkInterface) SetAllowMmdsRequests(val OptBool)
- func (s *NetworkInterface) SetFake()
- func (s *NetworkInterface) SetGuestMAC(val OptString)
- func (s *NetworkInterface) SetHostDevName(val string)
- func (s *NetworkInterface) SetIfaceID(val string)
- func (s *NetworkInterface) SetRxRateLimiter(val OptRateLimiter)
- func (s *NetworkInterface) SetTxRateLimiter(val OptRateLimiter)
- func (s *NetworkInterface) UnmarshalJSON(data []byte) error
- func (s *NetworkInterface) Validate() error
- type OptBalloon
- func (o *OptBalloon) Decode(d *jx.Decoder) error
- func (o OptBalloon) Encode(e *jx.Encoder)
- func (o OptBalloon) Get() (v Balloon, ok bool)
- func (o OptBalloon) IsSet() bool
- func (s OptBalloon) MarshalJSON() ([]byte, error)
- func (o OptBalloon) Or(d Balloon) Balloon
- func (o *OptBalloon) Reset()
- func (s *OptBalloon) SetFake()
- func (o *OptBalloon) SetTo(v Balloon)
- func (s *OptBalloon) UnmarshalJSON(data []byte) error
- type OptBool
- func (o *OptBool) Decode(d *jx.Decoder) error
- func (o OptBool) Encode(e *jx.Encoder)
- func (o OptBool) Get() (v bool, ok bool)
- func (o OptBool) IsSet() bool
- func (s OptBool) MarshalJSON() ([]byte, error)
- func (o OptBool) Or(d bool) bool
- func (o *OptBool) Reset()
- func (s *OptBool) SetFake()
- func (o *OptBool) SetTo(v bool)
- func (s *OptBool) UnmarshalJSON(data []byte) error
- type OptBootSource
- func (o *OptBootSource) Decode(d *jx.Decoder) error
- func (o OptBootSource) Encode(e *jx.Encoder)
- func (o OptBootSource) Get() (v BootSource, ok bool)
- func (o OptBootSource) IsSet() bool
- func (s OptBootSource) MarshalJSON() ([]byte, error)
- func (o OptBootSource) Or(d BootSource) BootSource
- func (o *OptBootSource) Reset()
- func (s *OptBootSource) SetFake()
- func (o *OptBootSource) SetTo(v BootSource)
- func (s *OptBootSource) UnmarshalJSON(data []byte) error
- type OptCpuTemplate
- func (o *OptCpuTemplate) Decode(d *jx.Decoder) error
- func (o OptCpuTemplate) Encode(e *jx.Encoder)
- func (o OptCpuTemplate) Get() (v CpuTemplate, ok bool)
- func (o OptCpuTemplate) IsSet() bool
- func (s OptCpuTemplate) MarshalJSON() ([]byte, error)
- func (o OptCpuTemplate) Or(d CpuTemplate) CpuTemplate
- func (o *OptCpuTemplate) Reset()
- func (s *OptCpuTemplate) SetFake()
- func (o *OptCpuTemplate) SetTo(v CpuTemplate)
- func (s *OptCpuTemplate) UnmarshalJSON(data []byte) error
- type OptInt
- func (o *OptInt) Decode(d *jx.Decoder) error
- func (o OptInt) Encode(e *jx.Encoder)
- func (o OptInt) Get() (v int, ok bool)
- func (o OptInt) IsSet() bool
- func (s OptInt) MarshalJSON() ([]byte, error)
- func (o OptInt) Or(d int) int
- func (o *OptInt) Reset()
- func (s *OptInt) SetFake()
- func (o *OptInt) SetTo(v int)
- func (s *OptInt) UnmarshalJSON(data []byte) error
- type OptInt64
- func (o *OptInt64) Decode(d *jx.Decoder) error
- func (o OptInt64) Encode(e *jx.Encoder)
- func (o OptInt64) Get() (v int64, ok bool)
- func (o OptInt64) IsSet() bool
- func (s OptInt64) MarshalJSON() ([]byte, error)
- func (o OptInt64) Or(d int64) int64
- func (o *OptInt64) Reset()
- func (s *OptInt64) SetFake()
- func (o *OptInt64) SetTo(v int64)
- func (s *OptInt64) UnmarshalJSON(data []byte) error
- type OptLogger
- func (o *OptLogger) Decode(d *jx.Decoder) error
- func (o OptLogger) Encode(e *jx.Encoder)
- func (o OptLogger) Get() (v Logger, ok bool)
- func (o OptLogger) IsSet() bool
- func (s OptLogger) MarshalJSON() ([]byte, error)
- func (o OptLogger) Or(d Logger) Logger
- func (o *OptLogger) Reset()
- func (s *OptLogger) SetFake()
- func (o *OptLogger) SetTo(v Logger)
- func (s *OptLogger) UnmarshalJSON(data []byte) error
- type OptLoggerLevel
- func (o *OptLoggerLevel) Decode(d *jx.Decoder) error
- func (o OptLoggerLevel) Encode(e *jx.Encoder)
- func (o OptLoggerLevel) Get() (v LoggerLevel, ok bool)
- func (o OptLoggerLevel) IsSet() bool
- func (s OptLoggerLevel) MarshalJSON() ([]byte, error)
- func (o OptLoggerLevel) Or(d LoggerLevel) LoggerLevel
- func (o *OptLoggerLevel) Reset()
- func (s *OptLoggerLevel) SetFake()
- func (o *OptLoggerLevel) SetTo(v LoggerLevel)
- func (s *OptLoggerLevel) UnmarshalJSON(data []byte) error
- type OptMachineConfiguration
- func (o *OptMachineConfiguration) Decode(d *jx.Decoder) error
- func (o OptMachineConfiguration) Encode(e *jx.Encoder)
- func (o OptMachineConfiguration) Get() (v MachineConfiguration, ok bool)
- func (o OptMachineConfiguration) IsSet() bool
- func (s OptMachineConfiguration) MarshalJSON() ([]byte, error)
- func (o OptMachineConfiguration) Or(d MachineConfiguration) MachineConfiguration
- func (o *OptMachineConfiguration) Reset()
- func (s *OptMachineConfiguration) SetFake()
- func (o *OptMachineConfiguration) SetTo(v MachineConfiguration)
- func (s *OptMachineConfiguration) UnmarshalJSON(data []byte) error
- type OptMetrics
- func (o *OptMetrics) Decode(d *jx.Decoder) error
- func (o OptMetrics) Encode(e *jx.Encoder)
- func (o OptMetrics) Get() (v Metrics, ok bool)
- func (o OptMetrics) IsSet() bool
- func (s OptMetrics) MarshalJSON() ([]byte, error)
- func (o OptMetrics) Or(d Metrics) Metrics
- func (o *OptMetrics) Reset()
- func (s *OptMetrics) SetFake()
- func (o *OptMetrics) SetTo(v Metrics)
- func (s *OptMetrics) UnmarshalJSON(data []byte) error
- type OptMmdsConfig
- func (o *OptMmdsConfig) Decode(d *jx.Decoder) error
- func (o OptMmdsConfig) Encode(e *jx.Encoder)
- func (o OptMmdsConfig) Get() (v MmdsConfig, ok bool)
- func (o OptMmdsConfig) IsSet() bool
- func (s OptMmdsConfig) MarshalJSON() ([]byte, error)
- func (o OptMmdsConfig) Or(d MmdsConfig) MmdsConfig
- func (o *OptMmdsConfig) Reset()
- func (s *OptMmdsConfig) SetFake()
- func (o *OptMmdsConfig) SetTo(v MmdsConfig)
- func (s *OptMmdsConfig) UnmarshalJSON(data []byte) error
- type OptRateLimiter
- func (o *OptRateLimiter) Decode(d *jx.Decoder) error
- func (o OptRateLimiter) Encode(e *jx.Encoder)
- func (o OptRateLimiter) Get() (v RateLimiter, ok bool)
- func (o OptRateLimiter) IsSet() bool
- func (s OptRateLimiter) MarshalJSON() ([]byte, error)
- func (o OptRateLimiter) Or(d RateLimiter) RateLimiter
- func (o *OptRateLimiter) Reset()
- func (s *OptRateLimiter) SetFake()
- func (o *OptRateLimiter) SetTo(v RateLimiter)
- func (s *OptRateLimiter) UnmarshalJSON(data []byte) error
- type OptSnapshotCreateParamsSnapshotType
- func (o *OptSnapshotCreateParamsSnapshotType) Decode(d *jx.Decoder) error
- func (o OptSnapshotCreateParamsSnapshotType) Encode(e *jx.Encoder)
- func (o OptSnapshotCreateParamsSnapshotType) Get() (v SnapshotCreateParamsSnapshotType, ok bool)
- func (o OptSnapshotCreateParamsSnapshotType) IsSet() bool
- func (s OptSnapshotCreateParamsSnapshotType) MarshalJSON() ([]byte, error)
- func (o OptSnapshotCreateParamsSnapshotType) Or(d SnapshotCreateParamsSnapshotType) SnapshotCreateParamsSnapshotType
- func (o *OptSnapshotCreateParamsSnapshotType) Reset()
- func (s *OptSnapshotCreateParamsSnapshotType) SetFake()
- func (o *OptSnapshotCreateParamsSnapshotType) SetTo(v SnapshotCreateParamsSnapshotType)
- func (s *OptSnapshotCreateParamsSnapshotType) UnmarshalJSON(data []byte) error
- type OptString
- func (o *OptString) Decode(d *jx.Decoder) error
- func (o OptString) Encode(e *jx.Encoder)
- func (o OptString) Get() (v string, ok bool)
- func (o OptString) IsSet() bool
- func (s OptString) MarshalJSON() ([]byte, error)
- func (o OptString) Or(d string) string
- func (o *OptString) Reset()
- func (s *OptString) SetFake()
- func (o *OptString) SetTo(v string)
- func (s *OptString) UnmarshalJSON(data []byte) error
- type OptTokenBucket
- func (o *OptTokenBucket) Decode(d *jx.Decoder) error
- func (o OptTokenBucket) Encode(e *jx.Encoder)
- func (o OptTokenBucket) Get() (v TokenBucket, ok bool)
- func (o OptTokenBucket) IsSet() bool
- func (s OptTokenBucket) MarshalJSON() ([]byte, error)
- func (o OptTokenBucket) Or(d TokenBucket) TokenBucket
- func (o *OptTokenBucket) Reset()
- func (s *OptTokenBucket) SetFake()
- func (o *OptTokenBucket) SetTo(v TokenBucket)
- func (s *OptTokenBucket) UnmarshalJSON(data []byte) error
- type OptVsock
- func (o *OptVsock) Decode(d *jx.Decoder) error
- func (o OptVsock) Encode(e *jx.Encoder)
- func (o OptVsock) Get() (v Vsock, ok bool)
- func (o OptVsock) IsSet() bool
- func (s OptVsock) MarshalJSON() ([]byte, error)
- func (o OptVsock) Or(d Vsock) Vsock
- func (o *OptVsock) Reset()
- func (s *OptVsock) SetFake()
- func (o *OptVsock) SetTo(v Vsock)
- func (s *OptVsock) UnmarshalJSON(data []byte) error
- type Option
- type PartialDrive
- func (s *PartialDrive) Decode(d *jx.Decoder) error
- func (s *PartialDrive) Encode(e *jx.Encoder)
- func (s *PartialDrive) GetDriveID() string
- func (s *PartialDrive) GetPathOnHost() OptString
- func (s *PartialDrive) GetRateLimiter() OptRateLimiter
- func (s *PartialDrive) MarshalJSON() ([]byte, error)
- func (s *PartialDrive) SetDriveID(val string)
- func (s *PartialDrive) SetFake()
- func (s *PartialDrive) SetPathOnHost(val OptString)
- func (s *PartialDrive) SetRateLimiter(val OptRateLimiter)
- func (s *PartialDrive) UnmarshalJSON(data []byte) error
- func (s *PartialDrive) Validate() error
- type PartialNetworkInterface
- func (s *PartialNetworkInterface) Decode(d *jx.Decoder) error
- func (s *PartialNetworkInterface) Encode(e *jx.Encoder)
- func (s *PartialNetworkInterface) GetIfaceID() string
- func (s *PartialNetworkInterface) GetRxRateLimiter() OptRateLimiter
- func (s *PartialNetworkInterface) GetTxRateLimiter() OptRateLimiter
- func (s *PartialNetworkInterface) MarshalJSON() ([]byte, error)
- func (s *PartialNetworkInterface) SetFake()
- func (s *PartialNetworkInterface) SetIfaceID(val string)
- func (s *PartialNetworkInterface) SetRxRateLimiter(val OptRateLimiter)
- func (s *PartialNetworkInterface) SetTxRateLimiter(val OptRateLimiter)
- func (s *PartialNetworkInterface) UnmarshalJSON(data []byte) error
- func (s *PartialNetworkInterface) Validate() error
- type PatchBalloonNoContent
- type PatchBalloonRes
- type PatchBalloonStatsIntervalNoContent
- type PatchBalloonStatsIntervalRes
- type PatchGuestDriveByIDNoContent
- type PatchGuestDriveByIDParams
- type PatchGuestDriveByIDRes
- type PatchGuestNetworkInterfaceByIDNoContent
- type PatchGuestNetworkInterfaceByIDParams
- type PatchGuestNetworkInterfaceByIDRes
- type PatchMachineConfigurationNoContent
- type PatchMachineConfigurationRes
- type PatchVmNoContent
- type PatchVmRes
- type PutBalloonNoContent
- type PutBalloonRes
- type PutGuestBootSourceNoContent
- type PutGuestBootSourceRes
- type PutGuestDriveByIDNoContent
- type PutGuestDriveByIDParams
- type PutGuestDriveByIDRes
- type PutGuestNetworkInterfaceByIDNoContent
- type PutGuestNetworkInterfaceByIDParams
- type PutGuestNetworkInterfaceByIDRes
- type PutGuestVsockNoContent
- type PutGuestVsockRes
- type PutLoggerNoContent
- type PutLoggerRes
- type PutMachineConfigurationNoContent
- type PutMachineConfigurationRes
- type PutMetricsNoContent
- type PutMetricsRes
- type RateLimiter
- func (s *RateLimiter) Decode(d *jx.Decoder) error
- func (s *RateLimiter) Encode(e *jx.Encoder)
- func (s *RateLimiter) GetBandwidth() OptTokenBucket
- func (s *RateLimiter) GetOps() OptTokenBucket
- func (s *RateLimiter) MarshalJSON() ([]byte, error)
- func (s *RateLimiter) SetBandwidth(val OptTokenBucket)
- func (s *RateLimiter) SetFake()
- func (s *RateLimiter) SetOps(val OptTokenBucket)
- func (s *RateLimiter) UnmarshalJSON(data []byte) error
- func (s *RateLimiter) Validate() error
- type Route
- type Server
- type ServerOption
- func WithErrorHandler(h ErrorHandler) ServerOption
- func WithMaxMultipartMemory(max int64) ServerOption
- func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
- func WithMiddleware(m ...Middleware) ServerOption
- func WithNotFound(notFound http.HandlerFunc) ServerOption
- func WithPathPrefix(prefix string) ServerOption
- type SnapshotCreateParams
- func (s *SnapshotCreateParams) Decode(d *jx.Decoder) error
- func (s *SnapshotCreateParams) Encode(e *jx.Encoder)
- func (s *SnapshotCreateParams) GetMemFilePath() string
- func (s *SnapshotCreateParams) GetSnapshotPath() string
- func (s *SnapshotCreateParams) GetSnapshotType() OptSnapshotCreateParamsSnapshotType
- func (s *SnapshotCreateParams) GetVersion() OptString
- func (s *SnapshotCreateParams) MarshalJSON() ([]byte, error)
- func (s *SnapshotCreateParams) SetFake()
- func (s *SnapshotCreateParams) SetMemFilePath(val string)
- func (s *SnapshotCreateParams) SetSnapshotPath(val string)
- func (s *SnapshotCreateParams) SetSnapshotType(val OptSnapshotCreateParamsSnapshotType)
- func (s *SnapshotCreateParams) SetVersion(val OptString)
- func (s *SnapshotCreateParams) UnmarshalJSON(data []byte) error
- func (s *SnapshotCreateParams) Validate() error
- type SnapshotCreateParamsSnapshotType
- func (SnapshotCreateParamsSnapshotType) AllValues() []SnapshotCreateParamsSnapshotType
- func (s *SnapshotCreateParamsSnapshotType) Decode(d *jx.Decoder) error
- func (s SnapshotCreateParamsSnapshotType) Encode(e *jx.Encoder)
- func (s SnapshotCreateParamsSnapshotType) MarshalJSON() ([]byte, error)
- func (s SnapshotCreateParamsSnapshotType) MarshalText() ([]byte, error)
- func (s *SnapshotCreateParamsSnapshotType) SetFake()
- func (s *SnapshotCreateParamsSnapshotType) UnmarshalJSON(data []byte) error
- func (s *SnapshotCreateParamsSnapshotType) UnmarshalText(data []byte) error
- func (s SnapshotCreateParamsSnapshotType) Validate() error
- type SnapshotLoadParams
- func (s *SnapshotLoadParams) Decode(d *jx.Decoder) error
- func (s *SnapshotLoadParams) Encode(e *jx.Encoder)
- func (s *SnapshotLoadParams) GetEnableDiffSnapshots() OptBool
- func (s *SnapshotLoadParams) GetMemFilePath() string
- func (s *SnapshotLoadParams) GetResumeVM() OptBool
- func (s *SnapshotLoadParams) GetSnapshotPath() string
- func (s *SnapshotLoadParams) MarshalJSON() ([]byte, error)
- func (s *SnapshotLoadParams) SetEnableDiffSnapshots(val OptBool)
- func (s *SnapshotLoadParams) SetFake()
- func (s *SnapshotLoadParams) SetMemFilePath(val string)
- func (s *SnapshotLoadParams) SetResumeVM(val OptBool)
- func (s *SnapshotLoadParams) SetSnapshotPath(val string)
- func (s *SnapshotLoadParams) UnmarshalJSON(data []byte) error
- type TokenBucket
- func (s *TokenBucket) Decode(d *jx.Decoder) error
- func (s *TokenBucket) Encode(e *jx.Encoder)
- func (s *TokenBucket) GetOneTimeBurst() OptInt64
- func (s *TokenBucket) GetRefillTime() int64
- func (s *TokenBucket) GetSize() int64
- func (s *TokenBucket) MarshalJSON() ([]byte, error)
- func (s *TokenBucket) SetFake()
- func (s *TokenBucket) SetOneTimeBurst(val OptInt64)
- func (s *TokenBucket) SetRefillTime(val int64)
- func (s *TokenBucket) SetSize(val int64)
- func (s *TokenBucket) UnmarshalJSON(data []byte) error
- func (s *TokenBucket) Validate() error
- type UnimplementedHandler
- func (UnimplementedHandler) CreateSnapshot(ctx context.Context, req *SnapshotCreateParams) (r CreateSnapshotRes, _ error)
- func (UnimplementedHandler) CreateSyncAction(ctx context.Context, req *InstanceActionInfo) (r CreateSyncActionRes, _ error)
- func (UnimplementedHandler) DescribeBalloonConfig(ctx context.Context) (r DescribeBalloonConfigRes, _ error)
- func (UnimplementedHandler) DescribeBalloonStats(ctx context.Context) (r DescribeBalloonStatsRes, _ error)
- func (UnimplementedHandler) DescribeInstance(ctx context.Context) (r *InstanceInfo, _ error)
- func (UnimplementedHandler) GetExportVmConfig(ctx context.Context) (r *FullVmConfiguration, _ error)
- func (UnimplementedHandler) GetMachineConfiguration(ctx context.Context) (r *MachineConfiguration, _ error)
- func (UnimplementedHandler) LoadSnapshot(ctx context.Context, req *SnapshotLoadParams) (r LoadSnapshotRes, _ error)
- func (UnimplementedHandler) MmdsConfigPut(ctx context.Context, req *MmdsConfig) (r MmdsConfigPutRes, _ error)
- func (UnimplementedHandler) MmdsGet(ctx context.Context) (r MmdsGetRes, _ error)
- func (UnimplementedHandler) MmdsPatch(ctx context.Context, req *MmdsPatchReq) (r MmdsPatchRes, _ error)
- func (UnimplementedHandler) MmdsPut(ctx context.Context, req *MmdsPutReq) (r MmdsPutRes, _ error)
- func (UnimplementedHandler) NewError(ctx context.Context, err error) (r *ErrorStatusCode)
- func (UnimplementedHandler) PatchBalloon(ctx context.Context, req *BalloonUpdate) (r PatchBalloonRes, _ error)
- func (UnimplementedHandler) PatchBalloonStatsInterval(ctx context.Context, req *BalloonStatsUpdate) (r PatchBalloonStatsIntervalRes, _ error)
- func (UnimplementedHandler) PatchGuestDriveByID(ctx context.Context, req *PartialDrive, params PatchGuestDriveByIDParams) (r PatchGuestDriveByIDRes, _ error)
- func (UnimplementedHandler) PatchGuestNetworkInterfaceByID(ctx context.Context, req *PartialNetworkInterface, ...) (r PatchGuestNetworkInterfaceByIDRes, _ error)
- func (UnimplementedHandler) PatchMachineConfiguration(ctx context.Context, req OptMachineConfiguration) (r PatchMachineConfigurationRes, _ error)
- func (UnimplementedHandler) PatchVm(ctx context.Context, req *VM) (r PatchVmRes, _ error)
- func (UnimplementedHandler) PutBalloon(ctx context.Context, req *Balloon) (r PutBalloonRes, _ error)
- func (UnimplementedHandler) PutGuestBootSource(ctx context.Context, req *BootSource) (r PutGuestBootSourceRes, _ error)
- func (UnimplementedHandler) PutGuestDriveByID(ctx context.Context, req *Drive, params PutGuestDriveByIDParams) (r PutGuestDriveByIDRes, _ error)
- func (UnimplementedHandler) PutGuestNetworkInterfaceByID(ctx context.Context, req *NetworkInterface, ...) (r PutGuestNetworkInterfaceByIDRes, _ error)
- func (UnimplementedHandler) PutGuestVsock(ctx context.Context, req *Vsock) (r PutGuestVsockRes, _ error)
- func (UnimplementedHandler) PutLogger(ctx context.Context, req *Logger) (r PutLoggerRes, _ error)
- func (UnimplementedHandler) PutMachineConfiguration(ctx context.Context, req OptMachineConfiguration) (r PutMachineConfigurationRes, _ error)
- func (UnimplementedHandler) PutMetrics(ctx context.Context, req *Metrics) (r PutMetricsRes, _ error)
- type VM
- type VMState
- func (VMState) AllValues() []VMState
- func (s *VMState) Decode(d *jx.Decoder) error
- func (s VMState) Encode(e *jx.Encoder)
- func (s VMState) MarshalJSON() ([]byte, error)
- func (s VMState) MarshalText() ([]byte, error)
- func (s *VMState) SetFake()
- func (s *VMState) UnmarshalJSON(data []byte) error
- func (s *VMState) UnmarshalText(data []byte) error
- func (s VMState) Validate() error
- type Vsock
- func (s *Vsock) Decode(d *jx.Decoder) error
- func (s *Vsock) Encode(e *jx.Encoder)
- func (s *Vsock) GetGuestCid() int
- func (s *Vsock) GetUdsPath() string
- func (s *Vsock) GetVsockID() string
- func (s *Vsock) MarshalJSON() ([]byte, error)
- func (s *Vsock) SetFake()
- func (s *Vsock) SetGuestCid(val int)
- func (s *Vsock) SetUdsPath(val string)
- func (s *Vsock) SetVsockID(val string)
- func (s *Vsock) UnmarshalJSON(data []byte) error
- func (s *Vsock) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Balloon ¶
type Balloon struct { // Target balloon size in MiB. AmountMib int `json:"amount_mib"` // Whether the balloon should deflate when the guest has memory pressure. DeflateOnOom bool `json:"deflate_on_oom"` // Interval in seconds between refreshing statistics. A non-zero value will enable the statistics. // Defaults to 0. StatsPollingIntervalS OptInt `json:"stats_polling_interval_s"` }
Balloon device descriptor. Ref: #/components/schemas/Balloon
func (*Balloon) GetAmountMib ¶
GetAmountMib returns the value of AmountMib.
func (*Balloon) GetDeflateOnOom ¶
GetDeflateOnOom returns the value of DeflateOnOom.
func (*Balloon) GetStatsPollingIntervalS ¶
GetStatsPollingIntervalS returns the value of StatsPollingIntervalS.
func (*Balloon) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Balloon) SetAmountMib ¶
SetAmountMib sets the value of AmountMib.
func (*Balloon) SetDeflateOnOom ¶
SetDeflateOnOom sets the value of DeflateOnOom.
func (*Balloon) SetStatsPollingIntervalS ¶
SetStatsPollingIntervalS sets the value of StatsPollingIntervalS.
func (*Balloon) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type BalloonStats ¶
type BalloonStats struct { // Target number of pages the device aims to hold. TargetPages int `json:"target_pages"` // Actual number of pages the device is holding. ActualPages int `json:"actual_pages"` // Target amount of memory (in MiB) the device aims to hold. TargetMib int `json:"target_mib"` // Actual amount of memory (in MiB) the device is holding. ActualMib int `json:"actual_mib"` // The amount of memory that has been swapped in (in bytes). SwapIn OptInt64 `json:"swap_in"` // The amount of memory that has been swapped out to disk (in bytes). SwapOut OptInt64 `json:"swap_out"` // The number of major page faults that have occurred. MajorFaults OptInt64 `json:"major_faults"` // The number of minor page faults that have occurred. MinorFaults OptInt64 `json:"minor_faults"` // The amount of memory not being used for any purpose (in bytes). FreeMemory OptInt64 `json:"free_memory"` // The total amount of memory available (in bytes). TotalMemory OptInt64 `json:"total_memory"` // An estimate of how much memory is available (in bytes) for starting new applications, without // pushing the system to swap. AvailableMemory OptInt64 `json:"available_memory"` // 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 OptInt64 `json:"disk_caches"` // The number of successful hugetlb page allocations in the guest. HugetlbAllocations OptInt64 `json:"hugetlb_allocations"` // The number of failed hugetlb page allocations in the guest. HugetlbFailures OptInt64 `json:"hugetlb_failures"` }
Describes the balloon device statistics. Ref: #/components/schemas/BalloonStats
func (*BalloonStats) Decode ¶
func (s *BalloonStats) Decode(d *jx.Decoder) error
Decode decodes BalloonStats from json.
func (*BalloonStats) Encode ¶
func (s *BalloonStats) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*BalloonStats) GetActualMib ¶
func (s *BalloonStats) GetActualMib() int
GetActualMib returns the value of ActualMib.
func (*BalloonStats) GetActualPages ¶
func (s *BalloonStats) GetActualPages() int
GetActualPages returns the value of ActualPages.
func (*BalloonStats) GetAvailableMemory ¶
func (s *BalloonStats) GetAvailableMemory() OptInt64
GetAvailableMemory returns the value of AvailableMemory.
func (*BalloonStats) GetDiskCaches ¶
func (s *BalloonStats) GetDiskCaches() OptInt64
GetDiskCaches returns the value of DiskCaches.
func (*BalloonStats) GetFreeMemory ¶
func (s *BalloonStats) GetFreeMemory() OptInt64
GetFreeMemory returns the value of FreeMemory.
func (*BalloonStats) GetHugetlbAllocations ¶
func (s *BalloonStats) GetHugetlbAllocations() OptInt64
GetHugetlbAllocations returns the value of HugetlbAllocations.
func (*BalloonStats) GetHugetlbFailures ¶
func (s *BalloonStats) GetHugetlbFailures() OptInt64
GetHugetlbFailures returns the value of HugetlbFailures.
func (*BalloonStats) GetMajorFaults ¶
func (s *BalloonStats) GetMajorFaults() OptInt64
GetMajorFaults returns the value of MajorFaults.
func (*BalloonStats) GetMinorFaults ¶
func (s *BalloonStats) GetMinorFaults() OptInt64
GetMinorFaults returns the value of MinorFaults.
func (*BalloonStats) GetSwapIn ¶
func (s *BalloonStats) GetSwapIn() OptInt64
GetSwapIn returns the value of SwapIn.
func (*BalloonStats) GetSwapOut ¶
func (s *BalloonStats) GetSwapOut() OptInt64
GetSwapOut returns the value of SwapOut.
func (*BalloonStats) GetTargetMib ¶
func (s *BalloonStats) GetTargetMib() int
GetTargetMib returns the value of TargetMib.
func (*BalloonStats) GetTargetPages ¶
func (s *BalloonStats) GetTargetPages() int
GetTargetPages returns the value of TargetPages.
func (*BalloonStats) GetTotalMemory ¶
func (s *BalloonStats) GetTotalMemory() OptInt64
GetTotalMemory returns the value of TotalMemory.
func (*BalloonStats) MarshalJSON ¶
func (s *BalloonStats) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*BalloonStats) SetActualMib ¶
func (s *BalloonStats) SetActualMib(val int)
SetActualMib sets the value of ActualMib.
func (*BalloonStats) SetActualPages ¶
func (s *BalloonStats) SetActualPages(val int)
SetActualPages sets the value of ActualPages.
func (*BalloonStats) SetAvailableMemory ¶
func (s *BalloonStats) SetAvailableMemory(val OptInt64)
SetAvailableMemory sets the value of AvailableMemory.
func (*BalloonStats) SetDiskCaches ¶
func (s *BalloonStats) SetDiskCaches(val OptInt64)
SetDiskCaches sets the value of DiskCaches.
func (*BalloonStats) SetFreeMemory ¶
func (s *BalloonStats) SetFreeMemory(val OptInt64)
SetFreeMemory sets the value of FreeMemory.
func (*BalloonStats) SetHugetlbAllocations ¶
func (s *BalloonStats) SetHugetlbAllocations(val OptInt64)
SetHugetlbAllocations sets the value of HugetlbAllocations.
func (*BalloonStats) SetHugetlbFailures ¶
func (s *BalloonStats) SetHugetlbFailures(val OptInt64)
SetHugetlbFailures sets the value of HugetlbFailures.
func (*BalloonStats) SetMajorFaults ¶
func (s *BalloonStats) SetMajorFaults(val OptInt64)
SetMajorFaults sets the value of MajorFaults.
func (*BalloonStats) SetMinorFaults ¶
func (s *BalloonStats) SetMinorFaults(val OptInt64)
SetMinorFaults sets the value of MinorFaults.
func (*BalloonStats) SetSwapIn ¶
func (s *BalloonStats) SetSwapIn(val OptInt64)
SetSwapIn sets the value of SwapIn.
func (*BalloonStats) SetSwapOut ¶
func (s *BalloonStats) SetSwapOut(val OptInt64)
SetSwapOut sets the value of SwapOut.
func (*BalloonStats) SetTargetMib ¶
func (s *BalloonStats) SetTargetMib(val int)
SetTargetMib sets the value of TargetMib.
func (*BalloonStats) SetTargetPages ¶
func (s *BalloonStats) SetTargetPages(val int)
SetTargetPages sets the value of TargetPages.
func (*BalloonStats) SetTotalMemory ¶
func (s *BalloonStats) SetTotalMemory(val OptInt64)
SetTotalMemory sets the value of TotalMemory.
func (*BalloonStats) UnmarshalJSON ¶
func (s *BalloonStats) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type BalloonStatsUpdate ¶
type BalloonStatsUpdate struct { // Interval in seconds between refreshing statistics. StatsPollingIntervalS int `json:"stats_polling_interval_s"` }
Update the statistics polling interval, with the first statistics update scheduled immediately. Statistics cannot be turned on/off after boot. Ref: #/components/schemas/BalloonStatsUpdate
func (*BalloonStatsUpdate) Decode ¶
func (s *BalloonStatsUpdate) Decode(d *jx.Decoder) error
Decode decodes BalloonStatsUpdate from json.
func (*BalloonStatsUpdate) Encode ¶
func (s *BalloonStatsUpdate) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*BalloonStatsUpdate) GetStatsPollingIntervalS ¶
func (s *BalloonStatsUpdate) GetStatsPollingIntervalS() int
GetStatsPollingIntervalS returns the value of StatsPollingIntervalS.
func (*BalloonStatsUpdate) MarshalJSON ¶
func (s *BalloonStatsUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*BalloonStatsUpdate) SetFake ¶
func (s *BalloonStatsUpdate) SetFake()
SetFake set fake values.
func (*BalloonStatsUpdate) SetStatsPollingIntervalS ¶
func (s *BalloonStatsUpdate) SetStatsPollingIntervalS(val int)
SetStatsPollingIntervalS sets the value of StatsPollingIntervalS.
func (*BalloonStatsUpdate) UnmarshalJSON ¶
func (s *BalloonStatsUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type BalloonUpdate ¶
type BalloonUpdate struct { // Target balloon size in MiB. AmountMib int `json:"amount_mib"` }
Balloon device descriptor. Ref: #/components/schemas/BalloonUpdate
func (*BalloonUpdate) Decode ¶
func (s *BalloonUpdate) Decode(d *jx.Decoder) error
Decode decodes BalloonUpdate from json.
func (*BalloonUpdate) Encode ¶
func (s *BalloonUpdate) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*BalloonUpdate) GetAmountMib ¶
func (s *BalloonUpdate) GetAmountMib() int
GetAmountMib returns the value of AmountMib.
func (*BalloonUpdate) MarshalJSON ¶
func (s *BalloonUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*BalloonUpdate) SetAmountMib ¶
func (s *BalloonUpdate) SetAmountMib(val int)
SetAmountMib sets the value of AmountMib.
func (*BalloonUpdate) UnmarshalJSON ¶
func (s *BalloonUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type BootSource ¶
type BootSource struct { // Kernel boot arguments. BootArgs OptString `json:"boot_args"` // Host level path to the initrd image used to boot the guest. InitrdPath OptString `json:"initrd_path"` // Host level path to the kernel image used to boot the guest. KernelImagePath string `json:"kernel_image_path"` }
Boot source descriptor. Ref: #/components/schemas/BootSource
func (*BootSource) Decode ¶
func (s *BootSource) Decode(d *jx.Decoder) error
Decode decodes BootSource from json.
func (*BootSource) Encode ¶
func (s *BootSource) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*BootSource) GetBootArgs ¶
func (s *BootSource) GetBootArgs() OptString
GetBootArgs returns the value of BootArgs.
func (*BootSource) GetInitrdPath ¶
func (s *BootSource) GetInitrdPath() OptString
GetInitrdPath returns the value of InitrdPath.
func (*BootSource) GetKernelImagePath ¶
func (s *BootSource) GetKernelImagePath() string
GetKernelImagePath returns the value of KernelImagePath.
func (*BootSource) MarshalJSON ¶
func (s *BootSource) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*BootSource) SetBootArgs ¶
func (s *BootSource) SetBootArgs(val OptString)
SetBootArgs sets the value of BootArgs.
func (*BootSource) SetInitrdPath ¶
func (s *BootSource) SetInitrdPath(val OptString)
SetInitrdPath sets the value of InitrdPath.
func (*BootSource) SetKernelImagePath ¶
func (s *BootSource) SetKernelImagePath(val string)
SetKernelImagePath sets the value of KernelImagePath.
func (*BootSource) UnmarshalJSON ¶
func (s *BootSource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements OAS client.
func NewClient ¶
func NewClient(serverURL string, opts ...ClientOption) (*Client, error)
NewClient initializes new Client defined by OAS.
func (*Client) CreateSnapshot ¶
func (c *Client) CreateSnapshot(ctx context.Context, request *SnapshotCreateParams) (CreateSnapshotRes, error)
CreateSnapshot invokes createSnapshot operation.
Creates a snapshot of the microVM state. The microVM should be in the `Paused` state.
PUT /snapshot/create
func (*Client) CreateSyncAction ¶
func (c *Client) CreateSyncAction(ctx context.Context, request *InstanceActionInfo) (CreateSyncActionRes, error)
CreateSyncAction invokes createSyncAction operation.
Creates a synchronous action.
PUT /actions
func (*Client) DescribeBalloonConfig ¶
func (c *Client) DescribeBalloonConfig(ctx context.Context) (DescribeBalloonConfigRes, error)
DescribeBalloonConfig invokes describeBalloonConfig operation.
Returns the current balloon device configuration.
GET /balloon
func (*Client) DescribeBalloonStats ¶
func (c *Client) DescribeBalloonStats(ctx context.Context) (DescribeBalloonStatsRes, error)
DescribeBalloonStats invokes describeBalloonStats operation.
Returns the latest balloon device statistics, only if enabled pre-boot.
GET /balloon/statistics
func (*Client) DescribeInstance ¶
func (c *Client) DescribeInstance(ctx context.Context) (*InstanceInfo, error)
DescribeInstance invokes describeInstance operation.
Returns general information about an instance.
GET /
func (*Client) GetExportVmConfig ¶
func (c *Client) GetExportVmConfig(ctx context.Context) (*FullVmConfiguration, error)
GetExportVmConfig invokes getExportVmConfig operation.
Gets configuration for all VM resources.
GET /vm/config
func (*Client) GetMachineConfiguration ¶
func (c *Client) GetMachineConfiguration(ctx context.Context) (*MachineConfiguration, error)
GetMachineConfiguration invokes getMachineConfiguration operation.
Gets the machine configuration of the VM. When called before the PUT operation, it will return the default values for the vCPU count (=1), memory size (=128 MiB). By default Hyperthreading is disabled and there is no CPU Template.
GET /machine-config
func (*Client) LoadSnapshot ¶
func (c *Client) LoadSnapshot(ctx context.Context, request *SnapshotLoadParams) (LoadSnapshotRes, error)
LoadSnapshot invokes loadSnapshot operation.
Loads the microVM state from a snapshot. Only accepted on a fresh Firecracker process (before configuring any resource other than the Logger and Metrics).
PUT /snapshot/load
func (*Client) MmdsConfigPut ¶
func (c *Client) MmdsConfigPut(ctx context.Context, request *MmdsConfig) (MmdsConfigPutRes, error)
MmdsConfigPut invokes PUT /mmds/config operation.
Creates MMDS configuration to be used by the MMDS network stack.
PUT /mmds/config
func (*Client) MmdsGet ¶
func (c *Client) MmdsGet(ctx context.Context) (MmdsGetRes, error)
MmdsGet invokes GET /mmds operation.
Get the MMDS data store.
GET /mmds
func (*Client) MmdsPatch ¶
func (c *Client) MmdsPatch(ctx context.Context, request *MmdsPatchReq) (MmdsPatchRes, error)
MmdsPatch invokes PATCH /mmds operation.
Updates the MMDS data store.
PATCH /mmds
func (*Client) MmdsPut ¶
func (c *Client) MmdsPut(ctx context.Context, request *MmdsPutReq) (MmdsPutRes, error)
MmdsPut invokes PUT /mmds operation.
Creates a MMDS (Microvm Metadata Service) data store.
PUT /mmds
func (*Client) PatchBalloon ¶
func (c *Client) PatchBalloon(ctx context.Context, request *BalloonUpdate) (PatchBalloonRes, error)
PatchBalloon invokes patchBalloon operation.
Updates an existing balloon device, before or after machine startup. Will fail if update is not possible.
PATCH /balloon
func (*Client) PatchBalloonStatsInterval ¶
func (c *Client) PatchBalloonStatsInterval(ctx context.Context, request *BalloonStatsUpdate) (PatchBalloonStatsIntervalRes, error)
PatchBalloonStatsInterval invokes patchBalloonStatsInterval operation.
Updates an existing balloon device statistics interval, before or after machine startup. Will fail if update is not possible.
PATCH /balloon/statistics
func (*Client) PatchGuestDriveByID ¶
func (c *Client) PatchGuestDriveByID(ctx context.Context, request *PartialDrive, params PatchGuestDriveByIDParams) (PatchGuestDriveByIDRes, error)
PatchGuestDriveByID invokes patchGuestDriveByID operation.
Updates the properties of the drive with the ID specified by drive_id path parameter. Will fail if update is not possible.
PATCH /drives/{drive_id}
func (*Client) PatchGuestNetworkInterfaceByID ¶
func (c *Client) PatchGuestNetworkInterfaceByID(ctx context.Context, request *PartialNetworkInterface, params PatchGuestNetworkInterfaceByIDParams) (PatchGuestNetworkInterfaceByIDRes, error)
PatchGuestNetworkInterfaceByID invokes patchGuestNetworkInterfaceByID operation.
Updates the rate limiters applied to a network interface.
PATCH /network-interfaces/{iface_id}
func (*Client) PatchMachineConfiguration ¶
func (c *Client) PatchMachineConfiguration(ctx context.Context, request OptMachineConfiguration) (PatchMachineConfigurationRes, error)
PatchMachineConfiguration invokes patchMachineConfiguration operation.
Partially updates the Virtual Machine Configuration with the specified input. If any of the parameters has an incorrect value, the whole update fails.
PATCH /machine-config
func (*Client) PatchVm ¶
PatchVm invokes patchVm operation.
Sets the desired state (Paused or Resumed) for the microVM.
PATCH /vm
func (*Client) PutBalloon ¶
PutBalloon invokes putBalloon operation.
Creates a new balloon device if one does not already exist, otherwise updates it, before machine startup. This will fail after machine startup. Will fail if update is not possible.
PUT /balloon
func (*Client) PutGuestBootSource ¶
func (c *Client) PutGuestBootSource(ctx context.Context, request *BootSource) (PutGuestBootSourceRes, error)
PutGuestBootSource invokes putGuestBootSource operation.
Creates new boot source if one does not already exist, otherwise updates it. Will fail if update is not possible.
PUT /boot-source
func (*Client) PutGuestDriveByID ¶
func (c *Client) PutGuestDriveByID(ctx context.Context, request *Drive, params PutGuestDriveByIDParams) (PutGuestDriveByIDRes, error)
PutGuestDriveByID invokes putGuestDriveByID operation.
Creates new drive with ID specified by drive_id path parameter. If a drive with the specified ID already exists, updates its state based on new input. Will fail if update is not possible.
PUT /drives/{drive_id}
func (*Client) PutGuestNetworkInterfaceByID ¶
func (c *Client) PutGuestNetworkInterfaceByID(ctx context.Context, request *NetworkInterface, params PutGuestNetworkInterfaceByIDParams) (PutGuestNetworkInterfaceByIDRes, error)
PutGuestNetworkInterfaceByID invokes putGuestNetworkInterfaceByID operation.
Creates new network interface with ID specified by iface_id path parameter.
PUT /network-interfaces/{iface_id}
func (*Client) PutGuestVsock ¶
PutGuestVsock invokes putGuestVsock operation.
The first call creates the device with the configuration specified in body. Subsequent calls will update the device configuration. May fail if update is not possible.
PUT /vsock
func (*Client) PutLogger ¶
PutLogger invokes putLogger operation.
Initializes the logger by specifying a named pipe or a file for the logs output.
PUT /logger
func (*Client) PutMachineConfiguration ¶
func (c *Client) PutMachineConfiguration(ctx context.Context, request OptMachineConfiguration) (PutMachineConfigurationRes, error)
PutMachineConfiguration invokes putMachineConfiguration operation.
Updates the Virtual Machine Configuration with the specified input. Firecracker starts with default values for vCPU count (=1) and memory size (=128 MiB). With Hyperthreading enabled, the vCPU count is restricted to be 1 or an even number, otherwise there are no restrictions regarding the vCPU count. If any of the parameters has an incorrect value, the whole update fails.
PUT /machine-config
func (*Client) PutMetrics ¶
PutMetrics invokes putMetrics operation.
Initializes the metrics system by specifying a named pipe or a file for the metrics output.
PUT /metrics
type ClientOption ¶
type ClientOption interface {
// contains filtered or unexported methods
}
ClientOption is client config option.
func WithClient ¶
func WithClient(client ht.Client) ClientOption
WithClient specifies http client to use.
type CpuTemplate ¶
type CpuTemplate string
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. Ref: #/components/schemas/CpuTemplate
const ( CpuTemplateC3 CpuTemplate = "C3" CpuTemplateT2 CpuTemplate = "T2" )
func (CpuTemplate) AllValues ¶
func (CpuTemplate) AllValues() []CpuTemplate
AllValues returns all CpuTemplate values.
func (*CpuTemplate) Decode ¶
func (s *CpuTemplate) Decode(d *jx.Decoder) error
Decode decodes CpuTemplate from json.
func (CpuTemplate) Encode ¶
func (s CpuTemplate) Encode(e *jx.Encoder)
Encode encodes CpuTemplate as json.
func (CpuTemplate) MarshalJSON ¶
func (s CpuTemplate) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (CpuTemplate) MarshalText ¶
func (s CpuTemplate) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*CpuTemplate) UnmarshalJSON ¶
func (s *CpuTemplate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CpuTemplate) UnmarshalText ¶
func (s *CpuTemplate) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (CpuTemplate) Validate ¶
func (s CpuTemplate) Validate() error
type CreateSnapshotNoContent ¶
type CreateSnapshotNoContent struct{}
CreateSnapshotNoContent is response for CreateSnapshot operation.
type CreateSnapshotRes ¶
type CreateSnapshotRes interface {
// contains filtered or unexported methods
}
type CreateSyncActionNoContent ¶
type CreateSyncActionNoContent struct{}
CreateSyncActionNoContent is response for CreateSyncAction operation.
type CreateSyncActionRes ¶
type CreateSyncActionRes interface {
// contains filtered or unexported methods
}
type DescribeBalloonConfigRes ¶
type DescribeBalloonConfigRes interface {
// contains filtered or unexported methods
}
type DescribeBalloonStatsRes ¶
type DescribeBalloonStatsRes interface {
// contains filtered or unexported methods
}
type Drive ¶
type Drive struct { DriveID string `json:"drive_id"` // Represents the caching strategy for the block device. CacheType OptString `json:"cache_type"` IsReadOnly bool `json:"is_read_only"` 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 OptString `json:"partuuid"` // Host level path for the guest drive. PathOnHost string `json:"path_on_host"` RateLimiter OptRateLimiter `json:"rate_limiter"` }
Ref: #/components/schemas/Drive
func (*Drive) GetCacheType ¶
GetCacheType returns the value of CacheType.
func (*Drive) GetDriveID ¶
GetDriveID returns the value of DriveID.
func (*Drive) GetIsReadOnly ¶
GetIsReadOnly returns the value of IsReadOnly.
func (*Drive) GetIsRootDevice ¶
GetIsRootDevice returns the value of IsRootDevice.
func (*Drive) GetPartuuid ¶
GetPartuuid returns the value of Partuuid.
func (*Drive) GetPathOnHost ¶
GetPathOnHost returns the value of PathOnHost.
func (*Drive) GetRateLimiter ¶
func (s *Drive) GetRateLimiter() OptRateLimiter
GetRateLimiter returns the value of RateLimiter.
func (*Drive) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Drive) SetCacheType ¶
SetCacheType sets the value of CacheType.
func (*Drive) SetDriveID ¶
SetDriveID sets the value of DriveID.
func (*Drive) SetIsReadOnly ¶
SetIsReadOnly sets the value of IsReadOnly.
func (*Drive) SetIsRootDevice ¶
SetIsRootDevice sets the value of IsRootDevice.
func (*Drive) SetPartuuid ¶
SetPartuuid sets the value of Partuuid.
func (*Drive) SetPathOnHost ¶
SetPathOnHost sets the value of PathOnHost.
func (*Drive) SetRateLimiter ¶
func (s *Drive) SetRateLimiter(val OptRateLimiter)
SetRateLimiter sets the value of RateLimiter.
func (*Drive) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Error ¶
type Error struct { // A description of the error condition. FaultMessage OptString `json:"fault_message"` }
Ref: #/components/schemas/Error
func (*Error) GetFaultMessage ¶
GetFaultMessage returns the value of FaultMessage.
func (*Error) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Error) SetFaultMessage ¶
SetFaultMessage sets the value of FaultMessage.
func (*Error) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type ErrorStatusCode ¶
ErrorStatusCode wraps Error with StatusCode.
func (*ErrorStatusCode) Error ¶
func (s *ErrorStatusCode) Error() string
func (*ErrorStatusCode) GetResponse ¶
func (s *ErrorStatusCode) GetResponse() Error
GetResponse returns the value of Response.
func (*ErrorStatusCode) GetStatusCode ¶
func (s *ErrorStatusCode) GetStatusCode() int
GetStatusCode returns the value of StatusCode.
func (*ErrorStatusCode) SetResponse ¶
func (s *ErrorStatusCode) SetResponse(val Error)
SetResponse sets the value of Response.
func (*ErrorStatusCode) SetStatusCode ¶
func (s *ErrorStatusCode) SetStatusCode(val int)
SetStatusCode sets the value of StatusCode.
type FullVmConfiguration ¶
type FullVmConfiguration struct { BalloonDevice OptBalloon `json:"balloon_device"` // Configurations for all block devices. BlockDevices []Drive `json:"block_devices"` BootSource OptBootSource `json:"boot_source"` Logger OptLogger `json:"logger"` MachineConfig OptMachineConfiguration `json:"machine_config"` Metrics OptMetrics `json:"metrics"` MmdsConfig OptMmdsConfig `json:"mmds_config"` // Configurations for all net devices. NetDevices []NetworkInterface `json:"net_devices"` VsockDevice OptVsock `json:"vsock_device"` }
Ref: #/components/schemas/FullVmConfiguration
func (*FullVmConfiguration) Decode ¶
func (s *FullVmConfiguration) Decode(d *jx.Decoder) error
Decode decodes FullVmConfiguration from json.
func (*FullVmConfiguration) Encode ¶
func (s *FullVmConfiguration) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*FullVmConfiguration) GetBalloonDevice ¶
func (s *FullVmConfiguration) GetBalloonDevice() OptBalloon
GetBalloonDevice returns the value of BalloonDevice.
func (*FullVmConfiguration) GetBlockDevices ¶
func (s *FullVmConfiguration) GetBlockDevices() []Drive
GetBlockDevices returns the value of BlockDevices.
func (*FullVmConfiguration) GetBootSource ¶
func (s *FullVmConfiguration) GetBootSource() OptBootSource
GetBootSource returns the value of BootSource.
func (*FullVmConfiguration) GetLogger ¶
func (s *FullVmConfiguration) GetLogger() OptLogger
GetLogger returns the value of Logger.
func (*FullVmConfiguration) GetMachineConfig ¶
func (s *FullVmConfiguration) GetMachineConfig() OptMachineConfiguration
GetMachineConfig returns the value of MachineConfig.
func (*FullVmConfiguration) GetMetrics ¶
func (s *FullVmConfiguration) GetMetrics() OptMetrics
GetMetrics returns the value of Metrics.
func (*FullVmConfiguration) GetMmdsConfig ¶
func (s *FullVmConfiguration) GetMmdsConfig() OptMmdsConfig
GetMmdsConfig returns the value of MmdsConfig.
func (*FullVmConfiguration) GetNetDevices ¶
func (s *FullVmConfiguration) GetNetDevices() []NetworkInterface
GetNetDevices returns the value of NetDevices.
func (*FullVmConfiguration) GetVsockDevice ¶
func (s *FullVmConfiguration) GetVsockDevice() OptVsock
GetVsockDevice returns the value of VsockDevice.
func (*FullVmConfiguration) MarshalJSON ¶
func (s *FullVmConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*FullVmConfiguration) SetBalloonDevice ¶
func (s *FullVmConfiguration) SetBalloonDevice(val OptBalloon)
SetBalloonDevice sets the value of BalloonDevice.
func (*FullVmConfiguration) SetBlockDevices ¶
func (s *FullVmConfiguration) SetBlockDevices(val []Drive)
SetBlockDevices sets the value of BlockDevices.
func (*FullVmConfiguration) SetBootSource ¶
func (s *FullVmConfiguration) SetBootSource(val OptBootSource)
SetBootSource sets the value of BootSource.
func (*FullVmConfiguration) SetFake ¶
func (s *FullVmConfiguration) SetFake()
SetFake set fake values.
func (*FullVmConfiguration) SetLogger ¶
func (s *FullVmConfiguration) SetLogger(val OptLogger)
SetLogger sets the value of Logger.
func (*FullVmConfiguration) SetMachineConfig ¶
func (s *FullVmConfiguration) SetMachineConfig(val OptMachineConfiguration)
SetMachineConfig sets the value of MachineConfig.
func (*FullVmConfiguration) SetMetrics ¶
func (s *FullVmConfiguration) SetMetrics(val OptMetrics)
SetMetrics sets the value of Metrics.
func (*FullVmConfiguration) SetMmdsConfig ¶
func (s *FullVmConfiguration) SetMmdsConfig(val OptMmdsConfig)
SetMmdsConfig sets the value of MmdsConfig.
func (*FullVmConfiguration) SetNetDevices ¶
func (s *FullVmConfiguration) SetNetDevices(val []NetworkInterface)
SetNetDevices sets the value of NetDevices.
func (*FullVmConfiguration) SetVsockDevice ¶
func (s *FullVmConfiguration) SetVsockDevice(val OptVsock)
SetVsockDevice sets the value of VsockDevice.
func (*FullVmConfiguration) UnmarshalJSON ¶
func (s *FullVmConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*FullVmConfiguration) Validate ¶
func (s *FullVmConfiguration) Validate() error
type Handler ¶
type Handler interface { // CreateSnapshot implements createSnapshot operation. // // Creates a snapshot of the microVM state. The microVM should be in the `Paused` state. // // PUT /snapshot/create CreateSnapshot(ctx context.Context, req *SnapshotCreateParams) (CreateSnapshotRes, error) // CreateSyncAction implements createSyncAction operation. // // Creates a synchronous action. // // PUT /actions CreateSyncAction(ctx context.Context, req *InstanceActionInfo) (CreateSyncActionRes, error) // DescribeBalloonConfig implements describeBalloonConfig operation. // // Returns the current balloon device configuration. // // GET /balloon DescribeBalloonConfig(ctx context.Context) (DescribeBalloonConfigRes, error) // DescribeBalloonStats implements describeBalloonStats operation. // // Returns the latest balloon device statistics, only if enabled pre-boot. // // GET /balloon/statistics DescribeBalloonStats(ctx context.Context) (DescribeBalloonStatsRes, error) // DescribeInstance implements describeInstance operation. // // Returns general information about an instance. // // GET / DescribeInstance(ctx context.Context) (*InstanceInfo, error) // GetExportVmConfig implements getExportVmConfig operation. // // Gets configuration for all VM resources. // // GET /vm/config GetExportVmConfig(ctx context.Context) (*FullVmConfiguration, error) // GetMachineConfiguration implements getMachineConfiguration operation. // // Gets the machine configuration of the VM. When called before the PUT operation, it will return the // default values for the vCPU count (=1), memory size (=128 MiB). By default Hyperthreading is // disabled and there is no CPU Template. // // GET /machine-config GetMachineConfiguration(ctx context.Context) (*MachineConfiguration, error) // LoadSnapshot implements loadSnapshot operation. // // Loads the microVM state from a snapshot. Only accepted on a fresh Firecracker process (before // configuring any resource other than the Logger and Metrics). // // PUT /snapshot/load LoadSnapshot(ctx context.Context, req *SnapshotLoadParams) (LoadSnapshotRes, error) // MmdsConfigPut implements PUT /mmds/config operation. // // Creates MMDS configuration to be used by the MMDS network stack. // // PUT /mmds/config MmdsConfigPut(ctx context.Context, req *MmdsConfig) (MmdsConfigPutRes, error) // MmdsGet implements GET /mmds operation. // // Get the MMDS data store. // // GET /mmds MmdsGet(ctx context.Context) (MmdsGetRes, error) // MmdsPatch implements PATCH /mmds operation. // // Updates the MMDS data store. // // PATCH /mmds MmdsPatch(ctx context.Context, req *MmdsPatchReq) (MmdsPatchRes, error) // MmdsPut implements PUT /mmds operation. // // Creates a MMDS (Microvm Metadata Service) data store. // // PUT /mmds MmdsPut(ctx context.Context, req *MmdsPutReq) (MmdsPutRes, error) // PatchBalloon implements patchBalloon operation. // // Updates an existing balloon device, before or after machine startup. Will fail if update is not // possible. // // PATCH /balloon PatchBalloon(ctx context.Context, req *BalloonUpdate) (PatchBalloonRes, error) // PatchBalloonStatsInterval implements patchBalloonStatsInterval operation. // // Updates an existing balloon device statistics interval, before or after machine startup. Will fail // if update is not possible. // // PATCH /balloon/statistics PatchBalloonStatsInterval(ctx context.Context, req *BalloonStatsUpdate) (PatchBalloonStatsIntervalRes, error) // PatchGuestDriveByID implements patchGuestDriveByID operation. // // Updates the properties of the drive with the ID specified by drive_id path parameter. Will fail if // update is not possible. // // PATCH /drives/{drive_id} PatchGuestDriveByID(ctx context.Context, req *PartialDrive, params PatchGuestDriveByIDParams) (PatchGuestDriveByIDRes, error) // PatchGuestNetworkInterfaceByID implements patchGuestNetworkInterfaceByID operation. // // Updates the rate limiters applied to a network interface. // // PATCH /network-interfaces/{iface_id} PatchGuestNetworkInterfaceByID(ctx context.Context, req *PartialNetworkInterface, params PatchGuestNetworkInterfaceByIDParams) (PatchGuestNetworkInterfaceByIDRes, error) // PatchMachineConfiguration implements patchMachineConfiguration operation. // // Partially updates the Virtual Machine Configuration with the specified input. If any of the // parameters has an incorrect value, the whole update fails. // // PATCH /machine-config PatchMachineConfiguration(ctx context.Context, req OptMachineConfiguration) (PatchMachineConfigurationRes, error) // PatchVm implements patchVm operation. // // Sets the desired state (Paused or Resumed) for the microVM. // // PATCH /vm PatchVm(ctx context.Context, req *VM) (PatchVmRes, error) // PutBalloon implements putBalloon operation. // // Creates a new balloon device if one does not already exist, otherwise updates it, before machine // startup. This will fail after machine startup. Will fail if update is not possible. // // PUT /balloon PutBalloon(ctx context.Context, req *Balloon) (PutBalloonRes, error) // PutGuestBootSource implements putGuestBootSource operation. // // Creates new boot source if one does not already exist, otherwise updates it. Will fail if update // is not possible. // // PUT /boot-source PutGuestBootSource(ctx context.Context, req *BootSource) (PutGuestBootSourceRes, error) // PutGuestDriveByID implements putGuestDriveByID operation. // // Creates new drive with ID specified by drive_id path parameter. If a drive with the specified ID // already exists, updates its state based on new input. Will fail if update is not possible. // // PUT /drives/{drive_id} PutGuestDriveByID(ctx context.Context, req *Drive, params PutGuestDriveByIDParams) (PutGuestDriveByIDRes, error) // PutGuestNetworkInterfaceByID implements putGuestNetworkInterfaceByID operation. // // Creates new network interface with ID specified by iface_id path parameter. // // PUT /network-interfaces/{iface_id} PutGuestNetworkInterfaceByID(ctx context.Context, req *NetworkInterface, params PutGuestNetworkInterfaceByIDParams) (PutGuestNetworkInterfaceByIDRes, error) // PutGuestVsock implements putGuestVsock operation. // // The first call creates the device with the configuration specified in body. Subsequent calls will // update the device configuration. May fail if update is not possible. // // PUT /vsock PutGuestVsock(ctx context.Context, req *Vsock) (PutGuestVsockRes, error) // PutLogger implements putLogger operation. // // Initializes the logger by specifying a named pipe or a file for the logs output. // // PUT /logger PutLogger(ctx context.Context, req *Logger) (PutLoggerRes, error) // PutMachineConfiguration implements putMachineConfiguration operation. // // Updates the Virtual Machine Configuration with the specified input. Firecracker starts with // default values for vCPU count (=1) and memory size (=128 MiB). With Hyperthreading enabled, the // vCPU count is restricted to be 1 or an even number, otherwise there are no restrictions regarding // the vCPU count. If any of the parameters has an incorrect value, the whole update fails. // // PUT /machine-config PutMachineConfiguration(ctx context.Context, req OptMachineConfiguration) (PutMachineConfigurationRes, error) // PutMetrics implements putMetrics operation. // // Initializes the metrics system by specifying a named pipe or a file for the metrics output. // // PUT /metrics PutMetrics(ctx context.Context, req *Metrics) (PutMetricsRes, error) // NewError creates *ErrorStatusCode from error returned by handler. // // Used for common default response. NewError(ctx context.Context, err error) *ErrorStatusCode }
Handler handles operations described by OpenAPI v3 specification.
type InstanceActionInfo ¶
type InstanceActionInfo struct { // Enumeration indicating what type of action is contained in the payload. ActionType InstanceActionInfoActionType `json:"action_type"` }
Variant wrapper containing the real action. Ref: #/components/schemas/InstanceActionInfo
func (*InstanceActionInfo) Decode ¶
func (s *InstanceActionInfo) Decode(d *jx.Decoder) error
Decode decodes InstanceActionInfo from json.
func (*InstanceActionInfo) Encode ¶
func (s *InstanceActionInfo) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*InstanceActionInfo) GetActionType ¶
func (s *InstanceActionInfo) GetActionType() InstanceActionInfoActionType
GetActionType returns the value of ActionType.
func (*InstanceActionInfo) MarshalJSON ¶
func (s *InstanceActionInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*InstanceActionInfo) SetActionType ¶
func (s *InstanceActionInfo) SetActionType(val InstanceActionInfoActionType)
SetActionType sets the value of ActionType.
func (*InstanceActionInfo) SetFake ¶
func (s *InstanceActionInfo) SetFake()
SetFake set fake values.
func (*InstanceActionInfo) UnmarshalJSON ¶
func (s *InstanceActionInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*InstanceActionInfo) Validate ¶
func (s *InstanceActionInfo) Validate() error
type InstanceActionInfoActionType ¶
type InstanceActionInfoActionType string
Enumeration indicating what type of action is contained in the payload.
const ( InstanceActionInfoActionTypeFlushMetrics InstanceActionInfoActionType = "FlushMetrics" InstanceActionInfoActionTypeInstanceStart InstanceActionInfoActionType = "InstanceStart" InstanceActionInfoActionTypeSendCtrlAltDel InstanceActionInfoActionType = "SendCtrlAltDel" )
func (InstanceActionInfoActionType) AllValues ¶
func (InstanceActionInfoActionType) AllValues() []InstanceActionInfoActionType
AllValues returns all InstanceActionInfoActionType values.
func (*InstanceActionInfoActionType) Decode ¶
func (s *InstanceActionInfoActionType) Decode(d *jx.Decoder) error
Decode decodes InstanceActionInfoActionType from json.
func (InstanceActionInfoActionType) Encode ¶
func (s InstanceActionInfoActionType) Encode(e *jx.Encoder)
Encode encodes InstanceActionInfoActionType as json.
func (InstanceActionInfoActionType) MarshalJSON ¶
func (s InstanceActionInfoActionType) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (InstanceActionInfoActionType) MarshalText ¶
func (s InstanceActionInfoActionType) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*InstanceActionInfoActionType) SetFake ¶
func (s *InstanceActionInfoActionType) SetFake()
SetFake set fake values.
func (*InstanceActionInfoActionType) UnmarshalJSON ¶
func (s *InstanceActionInfoActionType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*InstanceActionInfoActionType) UnmarshalText ¶
func (s *InstanceActionInfoActionType) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (InstanceActionInfoActionType) Validate ¶
func (s InstanceActionInfoActionType) Validate() error
type InstanceInfo ¶
type InstanceInfo struct { // Application name. AppName string `json:"app_name"` // MicroVM / instance ID. 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. State InstanceInfoState `json:"state"` // MicroVM hypervisor build version. VmmVersion string `json:"vmm_version"` }
Describes MicroVM instance information. Ref: #/components/schemas/InstanceInfo
func (*InstanceInfo) Decode ¶
func (s *InstanceInfo) Decode(d *jx.Decoder) error
Decode decodes InstanceInfo from json.
func (*InstanceInfo) Encode ¶
func (s *InstanceInfo) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*InstanceInfo) GetAppName ¶
func (s *InstanceInfo) GetAppName() string
GetAppName returns the value of AppName.
func (*InstanceInfo) GetState ¶
func (s *InstanceInfo) GetState() InstanceInfoState
GetState returns the value of State.
func (*InstanceInfo) GetVmmVersion ¶
func (s *InstanceInfo) GetVmmVersion() string
GetVmmVersion returns the value of VmmVersion.
func (*InstanceInfo) MarshalJSON ¶
func (s *InstanceInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*InstanceInfo) SetAppName ¶
func (s *InstanceInfo) SetAppName(val string)
SetAppName sets the value of AppName.
func (*InstanceInfo) SetState ¶
func (s *InstanceInfo) SetState(val InstanceInfoState)
SetState sets the value of State.
func (*InstanceInfo) SetVmmVersion ¶
func (s *InstanceInfo) SetVmmVersion(val string)
SetVmmVersion sets the value of VmmVersion.
func (*InstanceInfo) UnmarshalJSON ¶
func (s *InstanceInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*InstanceInfo) Validate ¶
func (s *InstanceInfo) Validate() error
type InstanceInfoState ¶
type InstanceInfoState string
The current detailed state (Not started, Running, Paused) of the Firecracker instance. This value is read-only for the control-plane.
const ( InstanceInfoStateNotStarted InstanceInfoState = "Not started" InstanceInfoStateRunning InstanceInfoState = "Running" InstanceInfoStatePaused InstanceInfoState = "Paused" )
func (InstanceInfoState) AllValues ¶
func (InstanceInfoState) AllValues() []InstanceInfoState
AllValues returns all InstanceInfoState values.
func (*InstanceInfoState) Decode ¶
func (s *InstanceInfoState) Decode(d *jx.Decoder) error
Decode decodes InstanceInfoState from json.
func (InstanceInfoState) Encode ¶
func (s InstanceInfoState) Encode(e *jx.Encoder)
Encode encodes InstanceInfoState as json.
func (InstanceInfoState) MarshalJSON ¶
func (s InstanceInfoState) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (InstanceInfoState) MarshalText ¶
func (s InstanceInfoState) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*InstanceInfoState) UnmarshalJSON ¶
func (s *InstanceInfoState) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*InstanceInfoState) UnmarshalText ¶
func (s *InstanceInfoState) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (InstanceInfoState) Validate ¶
func (s InstanceInfoState) Validate() error
type Invoker ¶
type Invoker interface { // CreateSnapshot invokes createSnapshot operation. // // Creates a snapshot of the microVM state. The microVM should be in the `Paused` state. // // PUT /snapshot/create CreateSnapshot(ctx context.Context, request *SnapshotCreateParams) (CreateSnapshotRes, error) // CreateSyncAction invokes createSyncAction operation. // // Creates a synchronous action. // // PUT /actions CreateSyncAction(ctx context.Context, request *InstanceActionInfo) (CreateSyncActionRes, error) // DescribeBalloonConfig invokes describeBalloonConfig operation. // // Returns the current balloon device configuration. // // GET /balloon DescribeBalloonConfig(ctx context.Context) (DescribeBalloonConfigRes, error) // DescribeBalloonStats invokes describeBalloonStats operation. // // Returns the latest balloon device statistics, only if enabled pre-boot. // // GET /balloon/statistics DescribeBalloonStats(ctx context.Context) (DescribeBalloonStatsRes, error) // DescribeInstance invokes describeInstance operation. // // Returns general information about an instance. // // GET / DescribeInstance(ctx context.Context) (*InstanceInfo, error) // GetExportVmConfig invokes getExportVmConfig operation. // // Gets configuration for all VM resources. // // GET /vm/config GetExportVmConfig(ctx context.Context) (*FullVmConfiguration, error) // GetMachineConfiguration invokes getMachineConfiguration operation. // // Gets the machine configuration of the VM. When called before the PUT operation, it will return the // default values for the vCPU count (=1), memory size (=128 MiB). By default Hyperthreading is // disabled and there is no CPU Template. // // GET /machine-config GetMachineConfiguration(ctx context.Context) (*MachineConfiguration, error) // LoadSnapshot invokes loadSnapshot operation. // // Loads the microVM state from a snapshot. Only accepted on a fresh Firecracker process (before // configuring any resource other than the Logger and Metrics). // // PUT /snapshot/load LoadSnapshot(ctx context.Context, request *SnapshotLoadParams) (LoadSnapshotRes, error) // MmdsConfigPut invokes PUT /mmds/config operation. // // Creates MMDS configuration to be used by the MMDS network stack. // // PUT /mmds/config MmdsConfigPut(ctx context.Context, request *MmdsConfig) (MmdsConfigPutRes, error) // MmdsGet invokes GET /mmds operation. // // Get the MMDS data store. // // GET /mmds MmdsGet(ctx context.Context) (MmdsGetRes, error) // MmdsPatch invokes PATCH /mmds operation. // // Updates the MMDS data store. // // PATCH /mmds MmdsPatch(ctx context.Context, request *MmdsPatchReq) (MmdsPatchRes, error) // MmdsPut invokes PUT /mmds operation. // // Creates a MMDS (Microvm Metadata Service) data store. // // PUT /mmds MmdsPut(ctx context.Context, request *MmdsPutReq) (MmdsPutRes, error) // PatchBalloon invokes patchBalloon operation. // // Updates an existing balloon device, before or after machine startup. Will fail if update is not // possible. // // PATCH /balloon PatchBalloon(ctx context.Context, request *BalloonUpdate) (PatchBalloonRes, error) // PatchBalloonStatsInterval invokes patchBalloonStatsInterval operation. // // Updates an existing balloon device statistics interval, before or after machine startup. Will fail // if update is not possible. // // PATCH /balloon/statistics PatchBalloonStatsInterval(ctx context.Context, request *BalloonStatsUpdate) (PatchBalloonStatsIntervalRes, error) // PatchGuestDriveByID invokes patchGuestDriveByID operation. // // Updates the properties of the drive with the ID specified by drive_id path parameter. Will fail if // update is not possible. // // PATCH /drives/{drive_id} PatchGuestDriveByID(ctx context.Context, request *PartialDrive, params PatchGuestDriveByIDParams) (PatchGuestDriveByIDRes, error) // PatchGuestNetworkInterfaceByID invokes patchGuestNetworkInterfaceByID operation. // // Updates the rate limiters applied to a network interface. // // PATCH /network-interfaces/{iface_id} PatchGuestNetworkInterfaceByID(ctx context.Context, request *PartialNetworkInterface, params PatchGuestNetworkInterfaceByIDParams) (PatchGuestNetworkInterfaceByIDRes, error) // PatchMachineConfiguration invokes patchMachineConfiguration operation. // // Partially updates the Virtual Machine Configuration with the specified input. If any of the // parameters has an incorrect value, the whole update fails. // // PATCH /machine-config PatchMachineConfiguration(ctx context.Context, request OptMachineConfiguration) (PatchMachineConfigurationRes, error) // PatchVm invokes patchVm operation. // // Sets the desired state (Paused or Resumed) for the microVM. // // PATCH /vm PatchVm(ctx context.Context, request *VM) (PatchVmRes, error) // PutBalloon invokes putBalloon operation. // // Creates a new balloon device if one does not already exist, otherwise updates it, before machine // startup. This will fail after machine startup. Will fail if update is not possible. // // PUT /balloon PutBalloon(ctx context.Context, request *Balloon) (PutBalloonRes, error) // PutGuestBootSource invokes putGuestBootSource operation. // // Creates new boot source if one does not already exist, otherwise updates it. Will fail if update // is not possible. // // PUT /boot-source PutGuestBootSource(ctx context.Context, request *BootSource) (PutGuestBootSourceRes, error) // PutGuestDriveByID invokes putGuestDriveByID operation. // // Creates new drive with ID specified by drive_id path parameter. If a drive with the specified ID // already exists, updates its state based on new input. Will fail if update is not possible. // // PUT /drives/{drive_id} PutGuestDriveByID(ctx context.Context, request *Drive, params PutGuestDriveByIDParams) (PutGuestDriveByIDRes, error) // PutGuestNetworkInterfaceByID invokes putGuestNetworkInterfaceByID operation. // // Creates new network interface with ID specified by iface_id path parameter. // // PUT /network-interfaces/{iface_id} PutGuestNetworkInterfaceByID(ctx context.Context, request *NetworkInterface, params PutGuestNetworkInterfaceByIDParams) (PutGuestNetworkInterfaceByIDRes, error) // PutGuestVsock invokes putGuestVsock operation. // // The first call creates the device with the configuration specified in body. Subsequent calls will // update the device configuration. May fail if update is not possible. // // PUT /vsock PutGuestVsock(ctx context.Context, request *Vsock) (PutGuestVsockRes, error) // PutLogger invokes putLogger operation. // // Initializes the logger by specifying a named pipe or a file for the logs output. // // PUT /logger PutLogger(ctx context.Context, request *Logger) (PutLoggerRes, error) // PutMachineConfiguration invokes putMachineConfiguration operation. // // Updates the Virtual Machine Configuration with the specified input. Firecracker starts with // default values for vCPU count (=1) and memory size (=128 MiB). With Hyperthreading enabled, the // vCPU count is restricted to be 1 or an even number, otherwise there are no restrictions regarding // the vCPU count. If any of the parameters has an incorrect value, the whole update fails. // // PUT /machine-config PutMachineConfiguration(ctx context.Context, request OptMachineConfiguration) (PutMachineConfigurationRes, error) // PutMetrics invokes putMetrics operation. // // Initializes the metrics system by specifying a named pipe or a file for the metrics output. // // PUT /metrics PutMetrics(ctx context.Context, request *Metrics) (PutMetricsRes, error) }
Invoker invokes operations described by OpenAPI v3 specification.
type LoadSnapshotNoContent ¶
type LoadSnapshotNoContent struct{}
LoadSnapshotNoContent is response for LoadSnapshot operation.
type LoadSnapshotRes ¶
type LoadSnapshotRes interface {
// contains filtered or unexported methods
}
type Logger ¶
type Logger struct { // Set the level. The possible values are case-insensitive. Level OptLoggerLevel `json:"level"` // Path to the named pipe or file for the human readable log output. LogPath string `json:"log_path"` // Whether or not to output the level in the logs. ShowLevel OptBool `json:"show_level"` // Whether or not to include the file path and line number of the log's origin. ShowLogOrigin OptBool `json:"show_log_origin"` }
Describes the configuration option for the logging capability. Ref: #/components/schemas/Logger
func (*Logger) GetLevel ¶
func (s *Logger) GetLevel() OptLoggerLevel
GetLevel returns the value of Level.
func (*Logger) GetLogPath ¶
GetLogPath returns the value of LogPath.
func (*Logger) GetShowLevel ¶
GetShowLevel returns the value of ShowLevel.
func (*Logger) GetShowLogOrigin ¶
GetShowLogOrigin returns the value of ShowLogOrigin.
func (*Logger) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Logger) SetLevel ¶
func (s *Logger) SetLevel(val OptLoggerLevel)
SetLevel sets the value of Level.
func (*Logger) SetLogPath ¶
SetLogPath sets the value of LogPath.
func (*Logger) SetShowLevel ¶
SetShowLevel sets the value of ShowLevel.
func (*Logger) SetShowLogOrigin ¶
SetShowLogOrigin sets the value of ShowLogOrigin.
func (*Logger) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type LoggerLevel ¶
type LoggerLevel string
Set the level. The possible values are case-insensitive.
const ( LoggerLevelError LoggerLevel = "Error" LoggerLevelWarning LoggerLevel = "Warning" LoggerLevelInfo LoggerLevel = "Info" LoggerLevelDebug LoggerLevel = "Debug" )
func (LoggerLevel) AllValues ¶
func (LoggerLevel) AllValues() []LoggerLevel
AllValues returns all LoggerLevel values.
func (*LoggerLevel) Decode ¶
func (s *LoggerLevel) Decode(d *jx.Decoder) error
Decode decodes LoggerLevel from json.
func (LoggerLevel) Encode ¶
func (s LoggerLevel) Encode(e *jx.Encoder)
Encode encodes LoggerLevel as json.
func (LoggerLevel) MarshalJSON ¶
func (s LoggerLevel) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (LoggerLevel) MarshalText ¶
func (s LoggerLevel) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*LoggerLevel) UnmarshalJSON ¶
func (s *LoggerLevel) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*LoggerLevel) UnmarshalText ¶
func (s *LoggerLevel) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (LoggerLevel) Validate ¶
func (s LoggerLevel) Validate() error
type MachineConfiguration ¶
type MachineConfiguration struct { CPUTemplate OptCpuTemplate `json:"cpu_template"` // Flag for enabling/disabling Hyperthreading. HtEnabled bool `json:"ht_enabled"` // Memory size of VM. MemSizeMib int `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 OptBool `json:"track_dirty_pages"` // Number of vCPUs (either 1 or an even number). VcpuCount int `json:"vcpu_count"` }
Describes the number of vCPUs, memory size, Hyperthreading capabilities and the CPU template. Ref: #/components/schemas/MachineConfiguration
func (*MachineConfiguration) Decode ¶
func (s *MachineConfiguration) Decode(d *jx.Decoder) error
Decode decodes MachineConfiguration from json.
func (*MachineConfiguration) Encode ¶
func (s *MachineConfiguration) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*MachineConfiguration) GetCPUTemplate ¶
func (s *MachineConfiguration) GetCPUTemplate() OptCpuTemplate
GetCPUTemplate returns the value of CPUTemplate.
func (*MachineConfiguration) GetHtEnabled ¶
func (s *MachineConfiguration) GetHtEnabled() bool
GetHtEnabled returns the value of HtEnabled.
func (*MachineConfiguration) GetMemSizeMib ¶
func (s *MachineConfiguration) GetMemSizeMib() int
GetMemSizeMib returns the value of MemSizeMib.
func (*MachineConfiguration) GetTrackDirtyPages ¶
func (s *MachineConfiguration) GetTrackDirtyPages() OptBool
GetTrackDirtyPages returns the value of TrackDirtyPages.
func (*MachineConfiguration) GetVcpuCount ¶
func (s *MachineConfiguration) GetVcpuCount() int
GetVcpuCount returns the value of VcpuCount.
func (*MachineConfiguration) MarshalJSON ¶
func (s *MachineConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*MachineConfiguration) SetCPUTemplate ¶
func (s *MachineConfiguration) SetCPUTemplate(val OptCpuTemplate)
SetCPUTemplate sets the value of CPUTemplate.
func (*MachineConfiguration) SetFake ¶
func (s *MachineConfiguration) SetFake()
SetFake set fake values.
func (*MachineConfiguration) SetHtEnabled ¶
func (s *MachineConfiguration) SetHtEnabled(val bool)
SetHtEnabled sets the value of HtEnabled.
func (*MachineConfiguration) SetMemSizeMib ¶
func (s *MachineConfiguration) SetMemSizeMib(val int)
SetMemSizeMib sets the value of MemSizeMib.
func (*MachineConfiguration) SetTrackDirtyPages ¶
func (s *MachineConfiguration) SetTrackDirtyPages(val OptBool)
SetTrackDirtyPages sets the value of TrackDirtyPages.
func (*MachineConfiguration) SetVcpuCount ¶
func (s *MachineConfiguration) SetVcpuCount(val int)
SetVcpuCount sets the value of VcpuCount.
func (*MachineConfiguration) UnmarshalJSON ¶
func (s *MachineConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*MachineConfiguration) Validate ¶
func (s *MachineConfiguration) Validate() error
type Metrics ¶
type Metrics struct { // Path to the named pipe or file where the JSON-formatted metrics are flushed. MetricsPath string `json:"metrics_path"` }
Describes the configuration option for the metrics capability. Ref: #/components/schemas/Metrics
func (*Metrics) GetMetricsPath ¶
GetMetricsPath returns the value of MetricsPath.
func (*Metrics) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Metrics) SetMetricsPath ¶
SetMetricsPath sets the value of MetricsPath.
func (*Metrics) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type MmdsConfig ¶
type MmdsConfig struct { // A valid IPv4 link-local address. Ipv4Address OptString `json:"ipv4_address"` }
Defines the MMDS configuration. Ref: #/components/schemas/MmdsConfig
func (*MmdsConfig) Decode ¶
func (s *MmdsConfig) Decode(d *jx.Decoder) error
Decode decodes MmdsConfig from json.
func (*MmdsConfig) Encode ¶
func (s *MmdsConfig) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*MmdsConfig) GetIpv4Address ¶
func (s *MmdsConfig) GetIpv4Address() OptString
GetIpv4Address returns the value of Ipv4Address.
func (*MmdsConfig) MarshalJSON ¶
func (s *MmdsConfig) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*MmdsConfig) SetIpv4Address ¶
func (s *MmdsConfig) SetIpv4Address(val OptString)
SetIpv4Address sets the value of Ipv4Address.
func (*MmdsConfig) UnmarshalJSON ¶
func (s *MmdsConfig) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type MmdsConfigPutNoContent ¶
type MmdsConfigPutNoContent struct{}
MmdsConfigPutNoContent is response for MmdsConfigPut operation.
type MmdsConfigPutRes ¶
type MmdsConfigPutRes interface {
// contains filtered or unexported methods
}
type MmdsGetOK ¶
type MmdsGetOK struct{}
func (*MmdsGetOK) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*MmdsGetOK) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type MmdsGetRes ¶
type MmdsGetRes interface {
// contains filtered or unexported methods
}
type MmdsPatchNoContent ¶
type MmdsPatchNoContent struct{}
MmdsPatchNoContent is response for MmdsPatch operation.
type MmdsPatchReq ¶
type MmdsPatchReq struct{}
func (*MmdsPatchReq) Decode ¶
func (s *MmdsPatchReq) Decode(d *jx.Decoder) error
Decode decodes MmdsPatchReq from json.
func (*MmdsPatchReq) Encode ¶
func (s *MmdsPatchReq) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*MmdsPatchReq) MarshalJSON ¶
func (s *MmdsPatchReq) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*MmdsPatchReq) UnmarshalJSON ¶
func (s *MmdsPatchReq) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type MmdsPatchRes ¶
type MmdsPatchRes interface {
// contains filtered or unexported methods
}
type MmdsPutNoContent ¶
type MmdsPutNoContent struct{}
MmdsPutNoContent is response for MmdsPut operation.
type MmdsPutReq ¶
type MmdsPutReq struct{}
func (*MmdsPutReq) Decode ¶
func (s *MmdsPutReq) Decode(d *jx.Decoder) error
Decode decodes MmdsPutReq from json.
func (*MmdsPutReq) Encode ¶
func (s *MmdsPutReq) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*MmdsPutReq) MarshalJSON ¶
func (s *MmdsPutReq) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*MmdsPutReq) UnmarshalJSON ¶
func (s *MmdsPutReq) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type MmdsPutRes ¶
type MmdsPutRes interface {
// contains filtered or unexported methods
}
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 OptBool `json:"allow_mmds_requests"` GuestMAC OptString `json:"guest_mac"` // Host level path for the guest network interface. HostDevName string `json:"host_dev_name"` IfaceID string `json:"iface_id"` RxRateLimiter OptRateLimiter `json:"rx_rate_limiter"` TxRateLimiter OptRateLimiter `json:"tx_rate_limiter"` }
Defines a network interface. Ref: #/components/schemas/NetworkInterface
func (*NetworkInterface) Decode ¶
func (s *NetworkInterface) Decode(d *jx.Decoder) error
Decode decodes NetworkInterface from json.
func (*NetworkInterface) Encode ¶
func (s *NetworkInterface) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*NetworkInterface) GetAllowMmdsRequests ¶
func (s *NetworkInterface) GetAllowMmdsRequests() OptBool
GetAllowMmdsRequests returns the value of AllowMmdsRequests.
func (*NetworkInterface) GetGuestMAC ¶
func (s *NetworkInterface) GetGuestMAC() OptString
GetGuestMAC returns the value of GuestMAC.
func (*NetworkInterface) GetHostDevName ¶
func (s *NetworkInterface) GetHostDevName() string
GetHostDevName returns the value of HostDevName.
func (*NetworkInterface) GetIfaceID ¶
func (s *NetworkInterface) GetIfaceID() string
GetIfaceID returns the value of IfaceID.
func (*NetworkInterface) GetRxRateLimiter ¶
func (s *NetworkInterface) GetRxRateLimiter() OptRateLimiter
GetRxRateLimiter returns the value of RxRateLimiter.
func (*NetworkInterface) GetTxRateLimiter ¶
func (s *NetworkInterface) GetTxRateLimiter() OptRateLimiter
GetTxRateLimiter returns the value of TxRateLimiter.
func (*NetworkInterface) MarshalJSON ¶
func (s *NetworkInterface) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*NetworkInterface) SetAllowMmdsRequests ¶
func (s *NetworkInterface) SetAllowMmdsRequests(val OptBool)
SetAllowMmdsRequests sets the value of AllowMmdsRequests.
func (*NetworkInterface) SetGuestMAC ¶
func (s *NetworkInterface) SetGuestMAC(val OptString)
SetGuestMAC sets the value of GuestMAC.
func (*NetworkInterface) SetHostDevName ¶
func (s *NetworkInterface) SetHostDevName(val string)
SetHostDevName sets the value of HostDevName.
func (*NetworkInterface) SetIfaceID ¶
func (s *NetworkInterface) SetIfaceID(val string)
SetIfaceID sets the value of IfaceID.
func (*NetworkInterface) SetRxRateLimiter ¶
func (s *NetworkInterface) SetRxRateLimiter(val OptRateLimiter)
SetRxRateLimiter sets the value of RxRateLimiter.
func (*NetworkInterface) SetTxRateLimiter ¶
func (s *NetworkInterface) SetTxRateLimiter(val OptRateLimiter)
SetTxRateLimiter sets the value of TxRateLimiter.
func (*NetworkInterface) UnmarshalJSON ¶
func (s *NetworkInterface) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*NetworkInterface) Validate ¶
func (s *NetworkInterface) Validate() error
type OptBalloon ¶
OptBalloon is optional Balloon.
func NewOptBalloon ¶
func NewOptBalloon(v Balloon) OptBalloon
NewOptBalloon returns new OptBalloon with value set to v.
func (*OptBalloon) Decode ¶
func (o *OptBalloon) Decode(d *jx.Decoder) error
Decode decodes Balloon from json.
func (OptBalloon) Encode ¶
func (o OptBalloon) Encode(e *jx.Encoder)
Encode encodes Balloon as json.
func (OptBalloon) Get ¶
func (o OptBalloon) Get() (v Balloon, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptBalloon) IsSet ¶
func (o OptBalloon) IsSet() bool
IsSet returns true if OptBalloon was set.
func (OptBalloon) MarshalJSON ¶
func (s OptBalloon) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptBalloon) Or ¶
func (o OptBalloon) Or(d Balloon) Balloon
Or returns value if set, or given parameter if does not.
func (*OptBalloon) UnmarshalJSON ¶
func (s *OptBalloon) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptBool ¶
OptBool is optional bool.
func NewOptBool ¶
NewOptBool returns new OptBool with value set to v.
func (OptBool) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptBool) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptBootSource ¶
type OptBootSource struct { Value BootSource Set bool }
OptBootSource is optional BootSource.
func NewOptBootSource ¶
func NewOptBootSource(v BootSource) OptBootSource
NewOptBootSource returns new OptBootSource with value set to v.
func (*OptBootSource) Decode ¶
func (o *OptBootSource) Decode(d *jx.Decoder) error
Decode decodes BootSource from json.
func (OptBootSource) Encode ¶
func (o OptBootSource) Encode(e *jx.Encoder)
Encode encodes BootSource as json.
func (OptBootSource) Get ¶
func (o OptBootSource) Get() (v BootSource, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptBootSource) IsSet ¶
func (o OptBootSource) IsSet() bool
IsSet returns true if OptBootSource was set.
func (OptBootSource) MarshalJSON ¶
func (s OptBootSource) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptBootSource) Or ¶
func (o OptBootSource) Or(d BootSource) BootSource
Or returns value if set, or given parameter if does not.
func (*OptBootSource) UnmarshalJSON ¶
func (s *OptBootSource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptCpuTemplate ¶
type OptCpuTemplate struct { Value CpuTemplate Set bool }
OptCpuTemplate is optional CpuTemplate.
func NewOptCpuTemplate ¶
func NewOptCpuTemplate(v CpuTemplate) OptCpuTemplate
NewOptCpuTemplate returns new OptCpuTemplate with value set to v.
func (*OptCpuTemplate) Decode ¶
func (o *OptCpuTemplate) Decode(d *jx.Decoder) error
Decode decodes CpuTemplate from json.
func (OptCpuTemplate) Encode ¶
func (o OptCpuTemplate) Encode(e *jx.Encoder)
Encode encodes CpuTemplate as json.
func (OptCpuTemplate) Get ¶
func (o OptCpuTemplate) Get() (v CpuTemplate, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptCpuTemplate) IsSet ¶
func (o OptCpuTemplate) IsSet() bool
IsSet returns true if OptCpuTemplate was set.
func (OptCpuTemplate) MarshalJSON ¶
func (s OptCpuTemplate) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptCpuTemplate) Or ¶
func (o OptCpuTemplate) Or(d CpuTemplate) CpuTemplate
Or returns value if set, or given parameter if does not.
func (*OptCpuTemplate) UnmarshalJSON ¶
func (s *OptCpuTemplate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptInt ¶
OptInt is optional int.
func (OptInt) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptInt) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptInt64 ¶
OptInt64 is optional int64.
func NewOptInt64 ¶
NewOptInt64 returns new OptInt64 with value set to v.
func (OptInt64) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptInt64) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptLogger ¶
OptLogger is optional Logger.
func NewOptLogger ¶
NewOptLogger returns new OptLogger with value set to v.
func (OptLogger) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptLogger) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptLoggerLevel ¶
type OptLoggerLevel struct { Value LoggerLevel Set bool }
OptLoggerLevel is optional LoggerLevel.
func NewOptLoggerLevel ¶
func NewOptLoggerLevel(v LoggerLevel) OptLoggerLevel
NewOptLoggerLevel returns new OptLoggerLevel with value set to v.
func (*OptLoggerLevel) Decode ¶
func (o *OptLoggerLevel) Decode(d *jx.Decoder) error
Decode decodes LoggerLevel from json.
func (OptLoggerLevel) Encode ¶
func (o OptLoggerLevel) Encode(e *jx.Encoder)
Encode encodes LoggerLevel as json.
func (OptLoggerLevel) Get ¶
func (o OptLoggerLevel) Get() (v LoggerLevel, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptLoggerLevel) IsSet ¶
func (o OptLoggerLevel) IsSet() bool
IsSet returns true if OptLoggerLevel was set.
func (OptLoggerLevel) MarshalJSON ¶
func (s OptLoggerLevel) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptLoggerLevel) Or ¶
func (o OptLoggerLevel) Or(d LoggerLevel) LoggerLevel
Or returns value if set, or given parameter if does not.
func (*OptLoggerLevel) UnmarshalJSON ¶
func (s *OptLoggerLevel) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptMachineConfiguration ¶
type OptMachineConfiguration struct { Value MachineConfiguration Set bool }
OptMachineConfiguration is optional MachineConfiguration.
func NewOptMachineConfiguration ¶
func NewOptMachineConfiguration(v MachineConfiguration) OptMachineConfiguration
NewOptMachineConfiguration returns new OptMachineConfiguration with value set to v.
func (*OptMachineConfiguration) Decode ¶
func (o *OptMachineConfiguration) Decode(d *jx.Decoder) error
Decode decodes MachineConfiguration from json.
func (OptMachineConfiguration) Encode ¶
func (o OptMachineConfiguration) Encode(e *jx.Encoder)
Encode encodes MachineConfiguration as json.
func (OptMachineConfiguration) Get ¶
func (o OptMachineConfiguration) Get() (v MachineConfiguration, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptMachineConfiguration) IsSet ¶
func (o OptMachineConfiguration) IsSet() bool
IsSet returns true if OptMachineConfiguration was set.
func (OptMachineConfiguration) MarshalJSON ¶
func (s OptMachineConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptMachineConfiguration) Or ¶
func (o OptMachineConfiguration) Or(d MachineConfiguration) MachineConfiguration
Or returns value if set, or given parameter if does not.
func (*OptMachineConfiguration) Reset ¶
func (o *OptMachineConfiguration) Reset()
Reset unsets value.
func (*OptMachineConfiguration) SetFake ¶
func (s *OptMachineConfiguration) SetFake()
SetFake set fake values.
func (*OptMachineConfiguration) SetTo ¶
func (o *OptMachineConfiguration) SetTo(v MachineConfiguration)
SetTo sets value to v.
func (*OptMachineConfiguration) UnmarshalJSON ¶
func (s *OptMachineConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptMetrics ¶
OptMetrics is optional Metrics.
func NewOptMetrics ¶
func NewOptMetrics(v Metrics) OptMetrics
NewOptMetrics returns new OptMetrics with value set to v.
func (*OptMetrics) Decode ¶
func (o *OptMetrics) Decode(d *jx.Decoder) error
Decode decodes Metrics from json.
func (OptMetrics) Encode ¶
func (o OptMetrics) Encode(e *jx.Encoder)
Encode encodes Metrics as json.
func (OptMetrics) Get ¶
func (o OptMetrics) Get() (v Metrics, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptMetrics) IsSet ¶
func (o OptMetrics) IsSet() bool
IsSet returns true if OptMetrics was set.
func (OptMetrics) MarshalJSON ¶
func (s OptMetrics) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptMetrics) Or ¶
func (o OptMetrics) Or(d Metrics) Metrics
Or returns value if set, or given parameter if does not.
func (*OptMetrics) UnmarshalJSON ¶
func (s *OptMetrics) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptMmdsConfig ¶
type OptMmdsConfig struct { Value MmdsConfig Set bool }
OptMmdsConfig is optional MmdsConfig.
func NewOptMmdsConfig ¶
func NewOptMmdsConfig(v MmdsConfig) OptMmdsConfig
NewOptMmdsConfig returns new OptMmdsConfig with value set to v.
func (*OptMmdsConfig) Decode ¶
func (o *OptMmdsConfig) Decode(d *jx.Decoder) error
Decode decodes MmdsConfig from json.
func (OptMmdsConfig) Encode ¶
func (o OptMmdsConfig) Encode(e *jx.Encoder)
Encode encodes MmdsConfig as json.
func (OptMmdsConfig) Get ¶
func (o OptMmdsConfig) Get() (v MmdsConfig, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptMmdsConfig) IsSet ¶
func (o OptMmdsConfig) IsSet() bool
IsSet returns true if OptMmdsConfig was set.
func (OptMmdsConfig) MarshalJSON ¶
func (s OptMmdsConfig) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptMmdsConfig) Or ¶
func (o OptMmdsConfig) Or(d MmdsConfig) MmdsConfig
Or returns value if set, or given parameter if does not.
func (*OptMmdsConfig) UnmarshalJSON ¶
func (s *OptMmdsConfig) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptRateLimiter ¶
type OptRateLimiter struct { Value RateLimiter Set bool }
OptRateLimiter is optional RateLimiter.
func NewOptRateLimiter ¶
func NewOptRateLimiter(v RateLimiter) OptRateLimiter
NewOptRateLimiter returns new OptRateLimiter with value set to v.
func (*OptRateLimiter) Decode ¶
func (o *OptRateLimiter) Decode(d *jx.Decoder) error
Decode decodes RateLimiter from json.
func (OptRateLimiter) Encode ¶
func (o OptRateLimiter) Encode(e *jx.Encoder)
Encode encodes RateLimiter as json.
func (OptRateLimiter) Get ¶
func (o OptRateLimiter) Get() (v RateLimiter, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptRateLimiter) IsSet ¶
func (o OptRateLimiter) IsSet() bool
IsSet returns true if OptRateLimiter was set.
func (OptRateLimiter) MarshalJSON ¶
func (s OptRateLimiter) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptRateLimiter) Or ¶
func (o OptRateLimiter) Or(d RateLimiter) RateLimiter
Or returns value if set, or given parameter if does not.
func (*OptRateLimiter) UnmarshalJSON ¶
func (s *OptRateLimiter) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptSnapshotCreateParamsSnapshotType ¶
type OptSnapshotCreateParamsSnapshotType struct { Value SnapshotCreateParamsSnapshotType Set bool }
OptSnapshotCreateParamsSnapshotType is optional SnapshotCreateParamsSnapshotType.
func NewOptSnapshotCreateParamsSnapshotType ¶
func NewOptSnapshotCreateParamsSnapshotType(v SnapshotCreateParamsSnapshotType) OptSnapshotCreateParamsSnapshotType
NewOptSnapshotCreateParamsSnapshotType returns new OptSnapshotCreateParamsSnapshotType with value set to v.
func (*OptSnapshotCreateParamsSnapshotType) Decode ¶
func (o *OptSnapshotCreateParamsSnapshotType) Decode(d *jx.Decoder) error
Decode decodes SnapshotCreateParamsSnapshotType from json.
func (OptSnapshotCreateParamsSnapshotType) Encode ¶
func (o OptSnapshotCreateParamsSnapshotType) Encode(e *jx.Encoder)
Encode encodes SnapshotCreateParamsSnapshotType as json.
func (OptSnapshotCreateParamsSnapshotType) Get ¶
func (o OptSnapshotCreateParamsSnapshotType) Get() (v SnapshotCreateParamsSnapshotType, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptSnapshotCreateParamsSnapshotType) IsSet ¶
func (o OptSnapshotCreateParamsSnapshotType) IsSet() bool
IsSet returns true if OptSnapshotCreateParamsSnapshotType was set.
func (OptSnapshotCreateParamsSnapshotType) MarshalJSON ¶
func (s OptSnapshotCreateParamsSnapshotType) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptSnapshotCreateParamsSnapshotType) Or ¶
func (o OptSnapshotCreateParamsSnapshotType) Or(d SnapshotCreateParamsSnapshotType) SnapshotCreateParamsSnapshotType
Or returns value if set, or given parameter if does not.
func (*OptSnapshotCreateParamsSnapshotType) Reset ¶
func (o *OptSnapshotCreateParamsSnapshotType) Reset()
Reset unsets value.
func (*OptSnapshotCreateParamsSnapshotType) SetFake ¶
func (s *OptSnapshotCreateParamsSnapshotType) SetFake()
SetFake set fake values.
func (*OptSnapshotCreateParamsSnapshotType) SetTo ¶
func (o *OptSnapshotCreateParamsSnapshotType) SetTo(v SnapshotCreateParamsSnapshotType)
SetTo sets value to v.
func (*OptSnapshotCreateParamsSnapshotType) UnmarshalJSON ¶
func (s *OptSnapshotCreateParamsSnapshotType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptString ¶
OptString is optional string.
func NewOptString ¶
NewOptString returns new OptString with value set to v.
func (OptString) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptString) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptTokenBucket ¶
type OptTokenBucket struct { Value TokenBucket Set bool }
OptTokenBucket is optional TokenBucket.
func NewOptTokenBucket ¶
func NewOptTokenBucket(v TokenBucket) OptTokenBucket
NewOptTokenBucket returns new OptTokenBucket with value set to v.
func (*OptTokenBucket) Decode ¶
func (o *OptTokenBucket) Decode(d *jx.Decoder) error
Decode decodes TokenBucket from json.
func (OptTokenBucket) Encode ¶
func (o OptTokenBucket) Encode(e *jx.Encoder)
Encode encodes TokenBucket as json.
func (OptTokenBucket) Get ¶
func (o OptTokenBucket) Get() (v TokenBucket, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptTokenBucket) IsSet ¶
func (o OptTokenBucket) IsSet() bool
IsSet returns true if OptTokenBucket was set.
func (OptTokenBucket) MarshalJSON ¶
func (s OptTokenBucket) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptTokenBucket) Or ¶
func (o OptTokenBucket) Or(d TokenBucket) TokenBucket
Or returns value if set, or given parameter if does not.
func (*OptTokenBucket) UnmarshalJSON ¶
func (s *OptTokenBucket) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptVsock ¶
OptVsock is optional Vsock.
func NewOptVsock ¶
NewOptVsock returns new OptVsock with value set to v.
func (OptVsock) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptVsock) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Option ¶
type Option interface { ServerOption ClientOption }
Option is config option.
func WithMeterProvider ¶
func WithMeterProvider(provider metric.MeterProvider) Option
WithMeterProvider specifies a meter provider to use for creating a meter.
If none is specified, the otel.GetMeterProvider() is used.
func WithTracerProvider ¶
func WithTracerProvider(provider trace.TracerProvider) Option
WithTracerProvider specifies a tracer provider to use for creating a tracer.
If none is specified, the global provider is used.
type PartialDrive ¶
type PartialDrive struct { DriveID string `json:"drive_id"` // Host level path for the guest drive. PathOnHost OptString `json:"path_on_host"` RateLimiter OptRateLimiter `json:"rate_limiter"` }
Ref: #/components/schemas/PartialDrive
func (*PartialDrive) Decode ¶
func (s *PartialDrive) Decode(d *jx.Decoder) error
Decode decodes PartialDrive from json.
func (*PartialDrive) Encode ¶
func (s *PartialDrive) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*PartialDrive) GetDriveID ¶
func (s *PartialDrive) GetDriveID() string
GetDriveID returns the value of DriveID.
func (*PartialDrive) GetPathOnHost ¶
func (s *PartialDrive) GetPathOnHost() OptString
GetPathOnHost returns the value of PathOnHost.
func (*PartialDrive) GetRateLimiter ¶
func (s *PartialDrive) GetRateLimiter() OptRateLimiter
GetRateLimiter returns the value of RateLimiter.
func (*PartialDrive) MarshalJSON ¶
func (s *PartialDrive) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*PartialDrive) SetDriveID ¶
func (s *PartialDrive) SetDriveID(val string)
SetDriveID sets the value of DriveID.
func (*PartialDrive) SetPathOnHost ¶
func (s *PartialDrive) SetPathOnHost(val OptString)
SetPathOnHost sets the value of PathOnHost.
func (*PartialDrive) SetRateLimiter ¶
func (s *PartialDrive) SetRateLimiter(val OptRateLimiter)
SetRateLimiter sets the value of RateLimiter.
func (*PartialDrive) UnmarshalJSON ¶
func (s *PartialDrive) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*PartialDrive) Validate ¶
func (s *PartialDrive) Validate() error
type PartialNetworkInterface ¶
type PartialNetworkInterface struct { IfaceID string `json:"iface_id"` RxRateLimiter OptRateLimiter `json:"rx_rate_limiter"` TxRateLimiter OptRateLimiter `json:"tx_rate_limiter"` }
Defines a partial network interface structure, used to update the rate limiters for that interface,
after microvm start.
Ref: #/components/schemas/PartialNetworkInterface
func (*PartialNetworkInterface) Decode ¶
func (s *PartialNetworkInterface) Decode(d *jx.Decoder) error
Decode decodes PartialNetworkInterface from json.
func (*PartialNetworkInterface) Encode ¶
func (s *PartialNetworkInterface) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*PartialNetworkInterface) GetIfaceID ¶
func (s *PartialNetworkInterface) GetIfaceID() string
GetIfaceID returns the value of IfaceID.
func (*PartialNetworkInterface) GetRxRateLimiter ¶
func (s *PartialNetworkInterface) GetRxRateLimiter() OptRateLimiter
GetRxRateLimiter returns the value of RxRateLimiter.
func (*PartialNetworkInterface) GetTxRateLimiter ¶
func (s *PartialNetworkInterface) GetTxRateLimiter() OptRateLimiter
GetTxRateLimiter returns the value of TxRateLimiter.
func (*PartialNetworkInterface) MarshalJSON ¶
func (s *PartialNetworkInterface) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*PartialNetworkInterface) SetFake ¶
func (s *PartialNetworkInterface) SetFake()
SetFake set fake values.
func (*PartialNetworkInterface) SetIfaceID ¶
func (s *PartialNetworkInterface) SetIfaceID(val string)
SetIfaceID sets the value of IfaceID.
func (*PartialNetworkInterface) SetRxRateLimiter ¶
func (s *PartialNetworkInterface) SetRxRateLimiter(val OptRateLimiter)
SetRxRateLimiter sets the value of RxRateLimiter.
func (*PartialNetworkInterface) SetTxRateLimiter ¶
func (s *PartialNetworkInterface) SetTxRateLimiter(val OptRateLimiter)
SetTxRateLimiter sets the value of TxRateLimiter.
func (*PartialNetworkInterface) UnmarshalJSON ¶
func (s *PartialNetworkInterface) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*PartialNetworkInterface) Validate ¶
func (s *PartialNetworkInterface) Validate() error
type PatchBalloonNoContent ¶
type PatchBalloonNoContent struct{}
PatchBalloonNoContent is response for PatchBalloon operation.
type PatchBalloonRes ¶
type PatchBalloonRes interface {
// contains filtered or unexported methods
}
type PatchBalloonStatsIntervalNoContent ¶
type PatchBalloonStatsIntervalNoContent struct{}
PatchBalloonStatsIntervalNoContent is response for PatchBalloonStatsInterval operation.
type PatchBalloonStatsIntervalRes ¶
type PatchBalloonStatsIntervalRes interface {
// contains filtered or unexported methods
}
type PatchGuestDriveByIDNoContent ¶
type PatchGuestDriveByIDNoContent struct{}
PatchGuestDriveByIDNoContent is response for PatchGuestDriveByID operation.
type PatchGuestDriveByIDParams ¶
type PatchGuestDriveByIDParams struct { // The id of the guest drive. DriveID string }
PatchGuestDriveByIDParams is parameters of patchGuestDriveByID operation.
type PatchGuestDriveByIDRes ¶
type PatchGuestDriveByIDRes interface {
// contains filtered or unexported methods
}
type PatchGuestNetworkInterfaceByIDNoContent ¶
type PatchGuestNetworkInterfaceByIDNoContent struct{}
PatchGuestNetworkInterfaceByIDNoContent is response for PatchGuestNetworkInterfaceByID operation.
type PatchGuestNetworkInterfaceByIDParams ¶
type PatchGuestNetworkInterfaceByIDParams struct { // The id of the guest network interface. IfaceID string }
PatchGuestNetworkInterfaceByIDParams is parameters of patchGuestNetworkInterfaceByID operation.
type PatchGuestNetworkInterfaceByIDRes ¶
type PatchGuestNetworkInterfaceByIDRes interface {
// contains filtered or unexported methods
}
type PatchMachineConfigurationNoContent ¶
type PatchMachineConfigurationNoContent struct{}
PatchMachineConfigurationNoContent is response for PatchMachineConfiguration operation.
type PatchMachineConfigurationRes ¶
type PatchMachineConfigurationRes interface {
// contains filtered or unexported methods
}
type PatchVmNoContent ¶
type PatchVmNoContent struct{}
PatchVmNoContent is response for PatchVm operation.
type PatchVmRes ¶
type PatchVmRes interface {
// contains filtered or unexported methods
}
type PutBalloonNoContent ¶
type PutBalloonNoContent struct{}
PutBalloonNoContent is response for PutBalloon operation.
type PutBalloonRes ¶
type PutBalloonRes interface {
// contains filtered or unexported methods
}
type PutGuestBootSourceNoContent ¶
type PutGuestBootSourceNoContent struct{}
PutGuestBootSourceNoContent is response for PutGuestBootSource operation.
type PutGuestBootSourceRes ¶
type PutGuestBootSourceRes interface {
// contains filtered or unexported methods
}
type PutGuestDriveByIDNoContent ¶
type PutGuestDriveByIDNoContent struct{}
PutGuestDriveByIDNoContent is response for PutGuestDriveByID operation.
type PutGuestDriveByIDParams ¶
type PutGuestDriveByIDParams struct { // The id of the guest drive. DriveID string }
PutGuestDriveByIDParams is parameters of putGuestDriveByID operation.
type PutGuestDriveByIDRes ¶
type PutGuestDriveByIDRes interface {
// contains filtered or unexported methods
}
type PutGuestNetworkInterfaceByIDNoContent ¶
type PutGuestNetworkInterfaceByIDNoContent struct{}
PutGuestNetworkInterfaceByIDNoContent is response for PutGuestNetworkInterfaceByID operation.
type PutGuestNetworkInterfaceByIDParams ¶
type PutGuestNetworkInterfaceByIDParams struct { // The id of the guest network interface. IfaceID string }
PutGuestNetworkInterfaceByIDParams is parameters of putGuestNetworkInterfaceByID operation.
type PutGuestNetworkInterfaceByIDRes ¶
type PutGuestNetworkInterfaceByIDRes interface {
// contains filtered or unexported methods
}
type PutGuestVsockNoContent ¶
type PutGuestVsockNoContent struct{}
PutGuestVsockNoContent is response for PutGuestVsock operation.
type PutGuestVsockRes ¶
type PutGuestVsockRes interface {
// contains filtered or unexported methods
}
type PutLoggerNoContent ¶
type PutLoggerNoContent struct{}
PutLoggerNoContent is response for PutLogger operation.
type PutLoggerRes ¶
type PutLoggerRes interface {
// contains filtered or unexported methods
}
type PutMachineConfigurationNoContent ¶
type PutMachineConfigurationNoContent struct{}
PutMachineConfigurationNoContent is response for PutMachineConfiguration operation.
type PutMachineConfigurationRes ¶
type PutMachineConfigurationRes interface {
// contains filtered or unexported methods
}
type PutMetricsNoContent ¶
type PutMetricsNoContent struct{}
PutMetricsNoContent is response for PutMetrics operation.
type PutMetricsRes ¶
type PutMetricsRes interface {
// contains filtered or unexported methods
}
type RateLimiter ¶
type RateLimiter struct { Bandwidth OptTokenBucket `json:"bandwidth"` Ops OptTokenBucket `json:"ops"` }
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. Ref: #/components/schemas/RateLimiter
func (*RateLimiter) Decode ¶
func (s *RateLimiter) Decode(d *jx.Decoder) error
Decode decodes RateLimiter from json.
func (*RateLimiter) Encode ¶
func (s *RateLimiter) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*RateLimiter) GetBandwidth ¶
func (s *RateLimiter) GetBandwidth() OptTokenBucket
GetBandwidth returns the value of Bandwidth.
func (*RateLimiter) GetOps ¶
func (s *RateLimiter) GetOps() OptTokenBucket
GetOps returns the value of Ops.
func (*RateLimiter) MarshalJSON ¶
func (s *RateLimiter) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*RateLimiter) SetBandwidth ¶
func (s *RateLimiter) SetBandwidth(val OptTokenBucket)
SetBandwidth sets the value of Bandwidth.
func (*RateLimiter) SetOps ¶
func (s *RateLimiter) SetOps(val OptTokenBucket)
SetOps sets the value of Ops.
func (*RateLimiter) UnmarshalJSON ¶
func (s *RateLimiter) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*RateLimiter) Validate ¶
func (s *RateLimiter) Validate() error
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
Route is route object.
func (Route) OperationID ¶
OperationID returns OpenAPI operationId.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements http server based on OpenAPI v3 specification and calls Handler to handle requests.
func NewServer ¶
func NewServer(h Handler, opts ...ServerOption) (*Server, error)
NewServer creates new Server.
type ServerOption ¶
type ServerOption interface {
// contains filtered or unexported methods
}
ServerOption is server config option.
func WithErrorHandler ¶
func WithErrorHandler(h ErrorHandler) ServerOption
WithErrorHandler specifies error handler to use.
func WithMaxMultipartMemory ¶
func WithMaxMultipartMemory(max int64) ServerOption
WithMaxMultipartMemory specifies limit of memory for storing file parts. File parts which can't be stored in memory will be stored on disk in temporary files.
func WithMethodNotAllowed ¶
func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
WithMethodNotAllowed specifies Method Not Allowed handler to use.
func WithMiddleware ¶
func WithMiddleware(m ...Middleware) ServerOption
WithMiddleware specifies middlewares to use.
func WithNotFound ¶
func WithNotFound(notFound http.HandlerFunc) ServerOption
WithNotFound specifies Not Found handler to use.
func WithPathPrefix ¶
func WithPathPrefix(prefix string) ServerOption
WithPathPrefix specifies server path prefix.
type SnapshotCreateParams ¶
type SnapshotCreateParams struct { // Path to the file that will contain the guest memory. MemFilePath string `json:"mem_file_path"` // Path to the file that will contain the microVM state. SnapshotPath string `json:"snapshot_path"` // Type of snapshot to create. It is optional and by default, a full snapshot is created. SnapshotType OptSnapshotCreateParamsSnapshotType `json:"snapshot_type"` // The microVM version for which we want to create the snapshot. It is optional and it defaults to // the current version. Version OptString `json:"version"` }
Ref: #/components/schemas/SnapshotCreateParams
func (*SnapshotCreateParams) Decode ¶
func (s *SnapshotCreateParams) Decode(d *jx.Decoder) error
Decode decodes SnapshotCreateParams from json.
func (*SnapshotCreateParams) Encode ¶
func (s *SnapshotCreateParams) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*SnapshotCreateParams) GetMemFilePath ¶
func (s *SnapshotCreateParams) GetMemFilePath() string
GetMemFilePath returns the value of MemFilePath.
func (*SnapshotCreateParams) GetSnapshotPath ¶
func (s *SnapshotCreateParams) GetSnapshotPath() string
GetSnapshotPath returns the value of SnapshotPath.
func (*SnapshotCreateParams) GetSnapshotType ¶
func (s *SnapshotCreateParams) GetSnapshotType() OptSnapshotCreateParamsSnapshotType
GetSnapshotType returns the value of SnapshotType.
func (*SnapshotCreateParams) GetVersion ¶
func (s *SnapshotCreateParams) GetVersion() OptString
GetVersion returns the value of Version.
func (*SnapshotCreateParams) MarshalJSON ¶
func (s *SnapshotCreateParams) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*SnapshotCreateParams) SetFake ¶
func (s *SnapshotCreateParams) SetFake()
SetFake set fake values.
func (*SnapshotCreateParams) SetMemFilePath ¶
func (s *SnapshotCreateParams) SetMemFilePath(val string)
SetMemFilePath sets the value of MemFilePath.
func (*SnapshotCreateParams) SetSnapshotPath ¶
func (s *SnapshotCreateParams) SetSnapshotPath(val string)
SetSnapshotPath sets the value of SnapshotPath.
func (*SnapshotCreateParams) SetSnapshotType ¶
func (s *SnapshotCreateParams) SetSnapshotType(val OptSnapshotCreateParamsSnapshotType)
SetSnapshotType sets the value of SnapshotType.
func (*SnapshotCreateParams) SetVersion ¶
func (s *SnapshotCreateParams) SetVersion(val OptString)
SetVersion sets the value of Version.
func (*SnapshotCreateParams) UnmarshalJSON ¶
func (s *SnapshotCreateParams) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*SnapshotCreateParams) Validate ¶
func (s *SnapshotCreateParams) Validate() error
type SnapshotCreateParamsSnapshotType ¶
type SnapshotCreateParamsSnapshotType string
Type of snapshot to create. It is optional and by default, a full snapshot is created.
const ( SnapshotCreateParamsSnapshotTypeFull SnapshotCreateParamsSnapshotType = "Full" SnapshotCreateParamsSnapshotTypeDiff SnapshotCreateParamsSnapshotType = "Diff" )
func (SnapshotCreateParamsSnapshotType) AllValues ¶
func (SnapshotCreateParamsSnapshotType) AllValues() []SnapshotCreateParamsSnapshotType
AllValues returns all SnapshotCreateParamsSnapshotType values.
func (*SnapshotCreateParamsSnapshotType) Decode ¶
func (s *SnapshotCreateParamsSnapshotType) Decode(d *jx.Decoder) error
Decode decodes SnapshotCreateParamsSnapshotType from json.
func (SnapshotCreateParamsSnapshotType) Encode ¶
func (s SnapshotCreateParamsSnapshotType) Encode(e *jx.Encoder)
Encode encodes SnapshotCreateParamsSnapshotType as json.
func (SnapshotCreateParamsSnapshotType) MarshalJSON ¶
func (s SnapshotCreateParamsSnapshotType) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (SnapshotCreateParamsSnapshotType) MarshalText ¶
func (s SnapshotCreateParamsSnapshotType) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*SnapshotCreateParamsSnapshotType) SetFake ¶
func (s *SnapshotCreateParamsSnapshotType) SetFake()
SetFake set fake values.
func (*SnapshotCreateParamsSnapshotType) UnmarshalJSON ¶
func (s *SnapshotCreateParamsSnapshotType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*SnapshotCreateParamsSnapshotType) UnmarshalText ¶
func (s *SnapshotCreateParamsSnapshotType) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (SnapshotCreateParamsSnapshotType) Validate ¶
func (s SnapshotCreateParamsSnapshotType) Validate() error
type SnapshotLoadParams ¶
type SnapshotLoadParams struct { // Enable support for incremental (diff) snapshots by tracking dirty guest pages. EnableDiffSnapshots OptBool `json:"enable_diff_snapshots"` // Path to the file that contains the guest memory to be loaded. MemFilePath string `json:"mem_file_path"` // Path to the file that contains the microVM state to be loaded. SnapshotPath string `json:"snapshot_path"` // When set to true, the vm is also resumed if the snapshot load is successful. ResumeVM OptBool `json:"resume_vm"` }
Ref: #/components/schemas/SnapshotLoadParams
func (*SnapshotLoadParams) Decode ¶
func (s *SnapshotLoadParams) Decode(d *jx.Decoder) error
Decode decodes SnapshotLoadParams from json.
func (*SnapshotLoadParams) Encode ¶
func (s *SnapshotLoadParams) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*SnapshotLoadParams) GetEnableDiffSnapshots ¶
func (s *SnapshotLoadParams) GetEnableDiffSnapshots() OptBool
GetEnableDiffSnapshots returns the value of EnableDiffSnapshots.
func (*SnapshotLoadParams) GetMemFilePath ¶
func (s *SnapshotLoadParams) GetMemFilePath() string
GetMemFilePath returns the value of MemFilePath.
func (*SnapshotLoadParams) GetResumeVM ¶
func (s *SnapshotLoadParams) GetResumeVM() OptBool
GetResumeVM returns the value of ResumeVM.
func (*SnapshotLoadParams) GetSnapshotPath ¶
func (s *SnapshotLoadParams) GetSnapshotPath() string
GetSnapshotPath returns the value of SnapshotPath.
func (*SnapshotLoadParams) MarshalJSON ¶
func (s *SnapshotLoadParams) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*SnapshotLoadParams) SetEnableDiffSnapshots ¶
func (s *SnapshotLoadParams) SetEnableDiffSnapshots(val OptBool)
SetEnableDiffSnapshots sets the value of EnableDiffSnapshots.
func (*SnapshotLoadParams) SetFake ¶
func (s *SnapshotLoadParams) SetFake()
SetFake set fake values.
func (*SnapshotLoadParams) SetMemFilePath ¶
func (s *SnapshotLoadParams) SetMemFilePath(val string)
SetMemFilePath sets the value of MemFilePath.
func (*SnapshotLoadParams) SetResumeVM ¶
func (s *SnapshotLoadParams) SetResumeVM(val OptBool)
SetResumeVM sets the value of ResumeVM.
func (*SnapshotLoadParams) SetSnapshotPath ¶
func (s *SnapshotLoadParams) SetSnapshotPath(val string)
SetSnapshotPath sets the value of SnapshotPath.
func (*SnapshotLoadParams) UnmarshalJSON ¶
func (s *SnapshotLoadParams) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type TokenBucket ¶
type TokenBucket struct { // The initial size of a token bucket. OneTimeBurst OptInt64 `json:"one_time_burst"` // The amount of milliseconds it takes for the bucket to refill. RefillTime int64 `json:"refill_time"` // The total number of tokens this bucket can hold. Size int64 `json:"size"` }
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. Ref: #/components/schemas/TokenBucket
func (*TokenBucket) Decode ¶
func (s *TokenBucket) Decode(d *jx.Decoder) error
Decode decodes TokenBucket from json.
func (*TokenBucket) Encode ¶
func (s *TokenBucket) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*TokenBucket) GetOneTimeBurst ¶
func (s *TokenBucket) GetOneTimeBurst() OptInt64
GetOneTimeBurst returns the value of OneTimeBurst.
func (*TokenBucket) GetRefillTime ¶
func (s *TokenBucket) GetRefillTime() int64
GetRefillTime returns the value of RefillTime.
func (*TokenBucket) GetSize ¶
func (s *TokenBucket) GetSize() int64
GetSize returns the value of Size.
func (*TokenBucket) MarshalJSON ¶
func (s *TokenBucket) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*TokenBucket) SetOneTimeBurst ¶
func (s *TokenBucket) SetOneTimeBurst(val OptInt64)
SetOneTimeBurst sets the value of OneTimeBurst.
func (*TokenBucket) SetRefillTime ¶
func (s *TokenBucket) SetRefillTime(val int64)
SetRefillTime sets the value of RefillTime.
func (*TokenBucket) SetSize ¶
func (s *TokenBucket) SetSize(val int64)
SetSize sets the value of Size.
func (*TokenBucket) UnmarshalJSON ¶
func (s *TokenBucket) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*TokenBucket) Validate ¶
func (s *TokenBucket) Validate() error
type UnimplementedHandler ¶
type UnimplementedHandler struct{}
UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.
func (UnimplementedHandler) CreateSnapshot ¶
func (UnimplementedHandler) CreateSnapshot(ctx context.Context, req *SnapshotCreateParams) (r CreateSnapshotRes, _ error)
CreateSnapshot implements createSnapshot operation.
Creates a snapshot of the microVM state. The microVM should be in the `Paused` state.
PUT /snapshot/create
func (UnimplementedHandler) CreateSyncAction ¶
func (UnimplementedHandler) CreateSyncAction(ctx context.Context, req *InstanceActionInfo) (r CreateSyncActionRes, _ error)
CreateSyncAction implements createSyncAction operation.
Creates a synchronous action.
PUT /actions
func (UnimplementedHandler) DescribeBalloonConfig ¶
func (UnimplementedHandler) DescribeBalloonConfig(ctx context.Context) (r DescribeBalloonConfigRes, _ error)
DescribeBalloonConfig implements describeBalloonConfig operation.
Returns the current balloon device configuration.
GET /balloon
func (UnimplementedHandler) DescribeBalloonStats ¶
func (UnimplementedHandler) DescribeBalloonStats(ctx context.Context) (r DescribeBalloonStatsRes, _ error)
DescribeBalloonStats implements describeBalloonStats operation.
Returns the latest balloon device statistics, only if enabled pre-boot.
GET /balloon/statistics
func (UnimplementedHandler) DescribeInstance ¶
func (UnimplementedHandler) DescribeInstance(ctx context.Context) (r *InstanceInfo, _ error)
DescribeInstance implements describeInstance operation.
Returns general information about an instance.
GET /
func (UnimplementedHandler) GetExportVmConfig ¶
func (UnimplementedHandler) GetExportVmConfig(ctx context.Context) (r *FullVmConfiguration, _ error)
GetExportVmConfig implements getExportVmConfig operation.
Gets configuration for all VM resources.
GET /vm/config
func (UnimplementedHandler) GetMachineConfiguration ¶
func (UnimplementedHandler) GetMachineConfiguration(ctx context.Context) (r *MachineConfiguration, _ error)
GetMachineConfiguration implements getMachineConfiguration operation.
Gets the machine configuration of the VM. When called before the PUT operation, it will return the default values for the vCPU count (=1), memory size (=128 MiB). By default Hyperthreading is disabled and there is no CPU Template.
GET /machine-config
func (UnimplementedHandler) LoadSnapshot ¶
func (UnimplementedHandler) LoadSnapshot(ctx context.Context, req *SnapshotLoadParams) (r LoadSnapshotRes, _ error)
LoadSnapshot implements loadSnapshot operation.
Loads the microVM state from a snapshot. Only accepted on a fresh Firecracker process (before configuring any resource other than the Logger and Metrics).
PUT /snapshot/load
func (UnimplementedHandler) MmdsConfigPut ¶
func (UnimplementedHandler) MmdsConfigPut(ctx context.Context, req *MmdsConfig) (r MmdsConfigPutRes, _ error)
MmdsConfigPut implements PUT /mmds/config operation.
Creates MMDS configuration to be used by the MMDS network stack.
PUT /mmds/config
func (UnimplementedHandler) MmdsGet ¶
func (UnimplementedHandler) MmdsGet(ctx context.Context) (r MmdsGetRes, _ error)
MmdsGet implements GET /mmds operation.
Get the MMDS data store.
GET /mmds
func (UnimplementedHandler) MmdsPatch ¶
func (UnimplementedHandler) MmdsPatch(ctx context.Context, req *MmdsPatchReq) (r MmdsPatchRes, _ error)
MmdsPatch implements PATCH /mmds operation.
Updates the MMDS data store.
PATCH /mmds
func (UnimplementedHandler) MmdsPut ¶
func (UnimplementedHandler) MmdsPut(ctx context.Context, req *MmdsPutReq) (r MmdsPutRes, _ error)
MmdsPut implements PUT /mmds operation.
Creates a MMDS (Microvm Metadata Service) data store.
PUT /mmds
func (UnimplementedHandler) NewError ¶
func (UnimplementedHandler) NewError(ctx context.Context, err error) (r *ErrorStatusCode)
NewError creates *ErrorStatusCode from error returned by handler.
Used for common default response.
func (UnimplementedHandler) PatchBalloon ¶
func (UnimplementedHandler) PatchBalloon(ctx context.Context, req *BalloonUpdate) (r PatchBalloonRes, _ error)
PatchBalloon implements patchBalloon operation.
Updates an existing balloon device, before or after machine startup. Will fail if update is not possible.
PATCH /balloon
func (UnimplementedHandler) PatchBalloonStatsInterval ¶
func (UnimplementedHandler) PatchBalloonStatsInterval(ctx context.Context, req *BalloonStatsUpdate) (r PatchBalloonStatsIntervalRes, _ error)
PatchBalloonStatsInterval implements patchBalloonStatsInterval operation.
Updates an existing balloon device statistics interval, before or after machine startup. Will fail if update is not possible.
PATCH /balloon/statistics
func (UnimplementedHandler) PatchGuestDriveByID ¶
func (UnimplementedHandler) PatchGuestDriveByID(ctx context.Context, req *PartialDrive, params PatchGuestDriveByIDParams) (r PatchGuestDriveByIDRes, _ error)
PatchGuestDriveByID implements patchGuestDriveByID operation.
Updates the properties of the drive with the ID specified by drive_id path parameter. Will fail if update is not possible.
PATCH /drives/{drive_id}
func (UnimplementedHandler) PatchGuestNetworkInterfaceByID ¶
func (UnimplementedHandler) PatchGuestNetworkInterfaceByID(ctx context.Context, req *PartialNetworkInterface, params PatchGuestNetworkInterfaceByIDParams) (r PatchGuestNetworkInterfaceByIDRes, _ error)
PatchGuestNetworkInterfaceByID implements patchGuestNetworkInterfaceByID operation.
Updates the rate limiters applied to a network interface.
PATCH /network-interfaces/{iface_id}
func (UnimplementedHandler) PatchMachineConfiguration ¶
func (UnimplementedHandler) PatchMachineConfiguration(ctx context.Context, req OptMachineConfiguration) (r PatchMachineConfigurationRes, _ error)
PatchMachineConfiguration implements patchMachineConfiguration operation.
Partially updates the Virtual Machine Configuration with the specified input. If any of the parameters has an incorrect value, the whole update fails.
PATCH /machine-config
func (UnimplementedHandler) PatchVm ¶
func (UnimplementedHandler) PatchVm(ctx context.Context, req *VM) (r PatchVmRes, _ error)
PatchVm implements patchVm operation.
Sets the desired state (Paused or Resumed) for the microVM.
PATCH /vm
func (UnimplementedHandler) PutBalloon ¶
func (UnimplementedHandler) PutBalloon(ctx context.Context, req *Balloon) (r PutBalloonRes, _ error)
PutBalloon implements putBalloon operation.
Creates a new balloon device if one does not already exist, otherwise updates it, before machine startup. This will fail after machine startup. Will fail if update is not possible.
PUT /balloon
func (UnimplementedHandler) PutGuestBootSource ¶
func (UnimplementedHandler) PutGuestBootSource(ctx context.Context, req *BootSource) (r PutGuestBootSourceRes, _ error)
PutGuestBootSource implements putGuestBootSource operation.
Creates new boot source if one does not already exist, otherwise updates it. Will fail if update is not possible.
PUT /boot-source
func (UnimplementedHandler) PutGuestDriveByID ¶
func (UnimplementedHandler) PutGuestDriveByID(ctx context.Context, req *Drive, params PutGuestDriveByIDParams) (r PutGuestDriveByIDRes, _ error)
PutGuestDriveByID implements putGuestDriveByID operation.
Creates new drive with ID specified by drive_id path parameter. If a drive with the specified ID already exists, updates its state based on new input. Will fail if update is not possible.
PUT /drives/{drive_id}
func (UnimplementedHandler) PutGuestNetworkInterfaceByID ¶
func (UnimplementedHandler) PutGuestNetworkInterfaceByID(ctx context.Context, req *NetworkInterface, params PutGuestNetworkInterfaceByIDParams) (r PutGuestNetworkInterfaceByIDRes, _ error)
PutGuestNetworkInterfaceByID implements putGuestNetworkInterfaceByID operation.
Creates new network interface with ID specified by iface_id path parameter.
PUT /network-interfaces/{iface_id}
func (UnimplementedHandler) PutGuestVsock ¶
func (UnimplementedHandler) PutGuestVsock(ctx context.Context, req *Vsock) (r PutGuestVsockRes, _ error)
PutGuestVsock implements putGuestVsock operation.
The first call creates the device with the configuration specified in body. Subsequent calls will update the device configuration. May fail if update is not possible.
PUT /vsock
func (UnimplementedHandler) PutLogger ¶
func (UnimplementedHandler) PutLogger(ctx context.Context, req *Logger) (r PutLoggerRes, _ error)
PutLogger implements putLogger operation.
Initializes the logger by specifying a named pipe or a file for the logs output.
PUT /logger
func (UnimplementedHandler) PutMachineConfiguration ¶
func (UnimplementedHandler) PutMachineConfiguration(ctx context.Context, req OptMachineConfiguration) (r PutMachineConfigurationRes, _ error)
PutMachineConfiguration implements putMachineConfiguration operation.
Updates the Virtual Machine Configuration with the specified input. Firecracker starts with default values for vCPU count (=1) and memory size (=128 MiB). With Hyperthreading enabled, the vCPU count is restricted to be 1 or an even number, otherwise there are no restrictions regarding the vCPU count. If any of the parameters has an incorrect value, the whole update fails.
PUT /machine-config
func (UnimplementedHandler) PutMetrics ¶
func (UnimplementedHandler) PutMetrics(ctx context.Context, req *Metrics) (r PutMetricsRes, _ error)
PutMetrics implements putMetrics operation.
Initializes the metrics system by specifying a named pipe or a file for the metrics output.
PUT /metrics
type VM ¶
type VM struct {
State VMState `json:"state"`
}
Defines the microVM running state. It is especially useful in the snapshotting context. Ref: #/components/schemas/Vm
func (*VM) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*VM) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type VMState ¶
type VMState string
func (VMState) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (VMState) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (*VMState) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
func (*VMState) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
type Vsock ¶
type Vsock struct { // Guest Vsock CID. GuestCid int `json:"guest_cid"` // Path to UNIX domain socket, used to proxy vsock connections. UdsPath string `json:"uds_path"` VsockID string `json:"vsock_id"` }
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. Ref: #/components/schemas/Vsock
func (*Vsock) GetGuestCid ¶
GetGuestCid returns the value of GuestCid.
func (*Vsock) GetUdsPath ¶
GetUdsPath returns the value of UdsPath.
func (*Vsock) GetVsockID ¶
GetVsockID returns the value of VsockID.
func (*Vsock) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Vsock) SetGuestCid ¶
SetGuestCid sets the value of GuestCid.
func (*Vsock) SetUdsPath ¶
SetUdsPath sets the value of UdsPath.
func (*Vsock) SetVsockID ¶
SetVsockID sets the value of VsockID.
func (*Vsock) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
Source Files ¶
- oas_cfg_gen.go
- oas_client_gen.go
- oas_defaults_gen.go
- oas_faker_gen.go
- oas_handlers_gen.go
- oas_interfaces_gen.go
- oas_json_gen.go
- oas_middleware_gen.go
- oas_parameters_gen.go
- oas_request_decoders_gen.go
- oas_request_encoders_gen.go
- oas_response_decoders_gen.go
- oas_response_encoders_gen.go
- oas_router_gen.go
- oas_schemas_gen.go
- oas_server_gen.go
- oas_unimplemented_gen.go
- oas_validators_gen.go