Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Compiler = newCompiler()
)
View Source
var (
SemverType = cel.ObjectType("kubernetes.Semver")
)
Functions ¶
func MeetsConstraints ¶
func MeetsConstraints(filter *string, input DeviceAttributes) (bool, error)
Types ¶
type CompilationResult ¶
type CompilationResult struct { Program cel.Program Error *apiservercel.Error Expression string OutputType *cel.Type Environment *cel.Env }
CompilationResult represents a compiled expression.
func (CompilationResult) DeviceMatches ¶
func (c CompilationResult) DeviceMatches(ctx context.Context, input DeviceAttributes) (bool, error)
type DeviceAttributes ¶
type DeviceAttributes struct { // DriverName gets appended to any attribute which does not already have // a fully qualified name. If set, then it is also made available as // a string attribute. DriverName string Attributes []api.DeviceAttribute // CELSuffix gets appended to all attributes name in a CEL expression which are // not already fully qualified. Optional. // // TODO: remove this once we agree to require fully-qualified attribute names. CELSuffix string }
DeviceAttributes defines the input values for a CEL selector expression.
type Semver ¶
type Semver struct {
semver.Version
}
Semver provdes a CEL representation of a semver.Version.
func (Semver) ConvertToNative ¶
Click to show internal directories.
Click to hide internal directories.