require

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	WithGVK(apiVersion, kind string) RequirementBuilder
	WithRO(object runtime.Object) ROBuilder
}

func As

func As(objectName string) Builder

type ROBuilder

type ROBuilder interface {
	RequirementBuilder
	WithVersion(version string) ROBuilder
	WithScheme(scheme runtime.Scheme) ROBuilder
	WithNamespace(namespace *string) ROBuilder
}

type Requirement

type Requirement interface {
	Get() (name string, selector *fnv1.ResourceSelector, err error)
}

type RequirementBuilder

type RequirementBuilder interface {
	MatchName(resourceName string) Requirement
	MatchLabels(labels map[string]string) Requirement
}

type Requirements

type Requirements struct {
	// contains filtered or unexported fields
}

func Requires

func Requires(requirements ...Requirement) (*Requirements, error)

Requires returns a new Requirements instance that requires the given extra resources.

func (*Requirements) Assure

func (r *Requirements) Assure(req *fnv1.RunFunctionRequest) (provided bool, err error)

Assure checks if the requirements are met in the given request. If not, it returns false.

func (*Requirements) Register

func (r *Requirements) Register(rsp *fnv1.RunFunctionResponse)

Register registers the requirements in the given response.

Jump to

Keyboard shortcuts

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