claim

package
v0.0.0-...-df7ab8c Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: Apache-2.0 Imports: 7 Imported by: 2 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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