Documentation ¶
Index ¶
Constants ¶
View Source
const ( TypeConflict = "conflict" TypeMismatch = "mismatch" )
error types
Variables ¶
View Source
var ( // ErrValidate is an empty ValidateErr object, useful for type checking ErrValidate = &ValidateErr{} )
Functions ¶
This section is empty.
Types ¶
type ResourceControl ¶
type ResourceControl struct { MemoryLimit string `yaml:"memory_limit,omitempty" validate:"memory_limit:editable"` CPUQuota string `yaml:"cpu_quota,omitempty" validate:"cpu_quota:editable"` IOReadBandwidthMax string `yaml:"io_read_bandwidth_max,omitempty" validate:"io_read_bandwidth_max:editable"` IOWriteBandwidthMax string `yaml:"io_write_bandwidth_max,omitempty" validate:"io_write_bandwidth_max:editable"` LimitCORE string `yaml:"limit_core,omitempty" validate:"limit_core:editable"` }
ResourceControl is used to control the system resource See: https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html
type ValidateErr ¶
type ValidateErr struct { Type string // conflict type Target string // conflict Target Value any // conflict Value LHS string // object 1 RHS string // object 2 }
ValidateErr is the error when meta validation fails with conflicts
func (*ValidateErr) Error ¶
func (e *ValidateErr) Error() string
Error implements the error interface
func (*ValidateErr) Is ¶
func (e *ValidateErr) Is(target error) bool
Is implements the error interface
func (*ValidateErr) Unwrap ¶
func (e *ValidateErr) Unwrap() error
Unwrap implements the error interface
Click to show internal directories.
Click to hide internal directories.