agentspecbackfillkube

package
v0.0.0-...-804b954 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package agentspecbackfillkube adapts the fixed AgentSpecBackfill Kubernetes resource to controller ports.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnavailable identifies a Kubernetes API failure that may recover after a fresh list/watch.
	ErrUnavailable = errors.New("AgentSpecBackfill Kubernetes API unavailable")
	// ErrInvalidObject identifies a resource that is not the exact structural AgentSpecBackfill type.
	ErrInvalidObject = errors.New("AgentSpecBackfill Kubernetes object is invalid")
	// ErrConflict identifies a terminal status race whose winner cannot be safely accepted.
	ErrConflict = errors.New("AgentSpecBackfill Kubernetes status conflict")
	// ErrPermissionDenied identifies an API identity without the controller's declared resource authority.
	ErrPermissionDenied = errors.New("AgentSpecBackfill Kubernetes permission denied")
	// ErrRequestMissing identifies an immutable request that disappeared before terminal observation or status write.
	ErrRequestMissing = errors.New("AgentSpecBackfill Kubernetes request is missing")
)

Functions

This section is empty.

Types

type Adapter

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

Adapter maps only the fixed AgentSpecBackfill resource to the controller's Source and StatusStore ports.

func New

func New(config Config, resource Resource) (*Adapter, error)

New constructs an Adapter from a complete explicit configuration and one injected namespaced resource.

func NewREST

func NewREST(config Config) (*Adapter, error)

NewREST constructs an Adapter using only the declared Kubernetes API endpoint and projected ServiceAccount token.

func (*Adapter) CreateTerminal

func (adapter *Adapter) CreateTerminal(ctx context.Context, request agentspecbackfillcr.Request, candidate agentspecbackfillcr.Status) (agentspecbackfillcr.Status, bool, error)

CreateTerminal conditionally records one terminal status without overwriting an existing terminal winner.

func (*Adapter) List

func (adapter *Adapter) List(ctx context.Context) ([][]byte, error)

List projects a current namespaced list into deterministic canonical immutable request wires.

func (*Adapter) ReadTerminal

func (adapter *Adapter) ReadTerminal(ctx context.Context, request agentspecbackfillcr.Request) (agentspecbackfillcr.Status, bool, error)

ReadTerminal returns the exact existing terminal status bound to one immutable request.

func (*Adapter) Watch

func (adapter *Adapter) Watch(ctx context.Context) (agentspecbackfillprocess.Watch, error)

Watch opens a cancellable fixed-resource watch from the preceding list resource version.

type Config

type Config struct {
	APIServerURL   string
	Namespace      string
	CAFile         string
	TokenFile      string
	TLSServerName  string
	RequestTimeout time.Duration
}

Config declares the complete explicit Kubernetes control-plane connection for one controller instance.

type Resource

Resource is the narrow namespaced dynamic resource interface required by the adapter.

Jump to

Keyboard shortcuts

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