Documentation
¶
Overview ¶
Package agentspecbackfillkube adapts the fixed AgentSpecBackfill Kubernetes resource to controller ports.
Index ¶
- Variables
- type Adapter
- func (adapter *Adapter) CreateTerminal(ctx context.Context, request agentspecbackfillcr.Request, ...) (agentspecbackfillcr.Status, bool, error)
- func (adapter *Adapter) List(ctx context.Context) ([][]byte, error)
- func (adapter *Adapter) ReadTerminal(ctx context.Context, request agentspecbackfillcr.Request) (agentspecbackfillcr.Status, bool, error)
- func (adapter *Adapter) Watch(ctx context.Context) (agentspecbackfillprocess.Watch, error)
- type Config
- type Resource
Constants ¶
This section is empty.
Variables ¶
var ( 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 ¶
New constructs an Adapter from a complete explicit configuration and one injected namespaced resource.
func NewREST ¶
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 ¶
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.
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 ¶
type Resource interface {
List(context.Context, metav1.ListOptions) (*unstructured.UnstructuredList, error)
Watch(context.Context, metav1.ListOptions) (watch.Interface, error)
Get(context.Context, string, metav1.GetOptions) (*unstructured.Unstructured, error)
UpdateStatus(context.Context, *unstructured.Unstructured, metav1.UpdateOptions) (*unstructured.Unstructured, error)
}
Resource is the narrow namespaced dynamic resource interface required by the adapter.