claim

package
v0.0.0-...-2801263 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingPlugins = errors.New("no plugin for resource")
	ErrReleaseClaim   = errors.New("failed to release claim")
	ErrAlreadyStarted = errors.New("claimer already started")
	ErrNotStarted     = errors.New("claimer not running")
)
View Source
var (
	ErrInsufficientResources = errors.New("insufficient resources")
	ErrInvalidResourceClaim  = errors.New("invalid resource claim")
)

Functions

func NewResourceClaimer

func NewResourceClaimer(log logr.Logger, plugins ...Plugin) (*claimer, error)

Types

type Claimer

type Claimer interface {
	Claim(ctx context.Context, resources v1alpha1.ResourceList) (Claims, error)
	Release(ctx context.Context, claims Claims) error
	Start(ctx context.Context) error
	WaitUntilStarted(ctx context.Context) error
}

type Plugin

type Plugin interface {
	CanClaim(quantity resource.Quantity) bool
	Claim(quantity resource.Quantity) (ResourceClaim, error)
	Release(claim ResourceClaim) error
	Init() error
	Name() string
}

type ResourceClaim

type ResourceClaim interface{}

Jump to

Keyboard shortcuts

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