model

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OverridePolicyRenderData

type OverridePolicyRenderData struct {
	Type      policyv1alpha1.OverrideRuleType
	Op        policyv1alpha1.OverriderOperator
	Path      string
	Value     any
	ValueType policyv1alpha1.ValueType
	ValueRef  *ResourceRefer

	//resource
	Resources *corev1.ResourceRequirements
	// resource oversell
	ResourcesOversell *policyv1alpha1.ResourcesOversellRule
	// toleration
	Tolerations []*corev1.Toleration
	// affinity
	Affinity *corev1.Affinity
}

func (*OverridePolicyRenderData) String

func (mrd *OverridePolicyRenderData) String() string

type ResourceRefer

type ResourceRefer struct {
	From policyv1alpha1.ValueRefFrom
	// will convert to cue reference
	CueObjectKey string
	Path         string
}

type ValidateCondition

type ValidateCondition struct {
	Cond         string
	Value        *policyv1alpha1.ConstantValue
	ValueType    policyv1alpha1.ValueType
	ValueRef     *ResourceRefer
	DataRef      *ResourceRefer
	ValueProcess *ValueProcess
	Message      string
}

type ValidatePolicyRenderData

type ValidatePolicyRenderData struct {
	Type      string
	Condition *ValidateCondition
}

func (*ValidatePolicyRenderData) String

func (vrd *ValidatePolicyRenderData) String() string

type ValueProcess

type ValueProcess struct {
	Operation     policyv1alpha1.OperationType
	OperationWith float64
}

Jump to

Keyboard shortcuts

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