Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SnapshotCompressionConfig ¶
type SnapshotCompressionConfig struct {
// Enable snapshot memory compression
Enabled bool `json:"enabled" api:"required"`
// Compression algorithm (defaults to zstd when enabled). Ignored when enabled is
// false.
//
// Any of "zstd", "lz4".
Algorithm SnapshotCompressionConfigAlgorithm `json:"algorithm"`
// Compression level. Allowed ranges are zstd=1-19 and lz4=0-9. When omitted, zstd
// defaults to 1 and lz4 defaults to 0. Ignored when enabled is false.
Level int64 `json:"level"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Enabled respjson.Field
Algorithm respjson.Field
Level respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SnapshotCompressionConfig) RawJSON ¶
func (r SnapshotCompressionConfig) RawJSON() string
Returns the unmodified JSON received from the API
func (SnapshotCompressionConfig) ToParam ¶
func (r SnapshotCompressionConfig) ToParam() SnapshotCompressionConfigParam
ToParam converts this SnapshotCompressionConfig to a SnapshotCompressionConfigParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SnapshotCompressionConfigParam.Overrides()
func (*SnapshotCompressionConfig) UnmarshalJSON ¶
func (r *SnapshotCompressionConfig) UnmarshalJSON(data []byte) error
type SnapshotCompressionConfigAlgorithm ¶
type SnapshotCompressionConfigAlgorithm string
Compression algorithm (defaults to zstd when enabled). Ignored when enabled is false.
const ( SnapshotCompressionConfigAlgorithmZstd SnapshotCompressionConfigAlgorithm = "zstd" SnapshotCompressionConfigAlgorithmLz4 SnapshotCompressionConfigAlgorithm = "lz4" )
type SnapshotCompressionConfigParam ¶
type SnapshotCompressionConfigParam struct {
// Enable snapshot memory compression
Enabled bool `json:"enabled" api:"required"`
// Compression level. Allowed ranges are zstd=1-19 and lz4=0-9. When omitted, zstd
// defaults to 1 and lz4 defaults to 0. Ignored when enabled is false.
Level param.Opt[int64] `json:"level,omitzero"`
// Compression algorithm (defaults to zstd when enabled). Ignored when enabled is
// false.
//
// Any of "zstd", "lz4".
Algorithm SnapshotCompressionConfigAlgorithm `json:"algorithm,omitzero"`
// contains filtered or unexported fields
}
The property Enabled is required.
func (SnapshotCompressionConfigParam) MarshalJSON ¶
func (r SnapshotCompressionConfigParam) MarshalJSON() (data []byte, err error)
func (*SnapshotCompressionConfigParam) UnmarshalJSON ¶
func (r *SnapshotCompressionConfigParam) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.