meta

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

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 DirPaths

type DirPaths struct {
	Deploy string
	Data   string
	Log    string
	Cache  string
}

DirPaths stores the paths needed for component to put files

func (DirPaths) String

func (p DirPaths) String() string

String implements the fmt.Stringer interface

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL