inputisolation

package
v0.6.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package inputisolation selects independently valid watched-resource updates.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Callbacks

type Callbacks struct {
	Count   func(int)
	Updated func([]Rejection)
}

Callbacks reports accepted rejection diagnostics without changing validation.

type Pipeline

type Pipeline interface {
	Execute(context.Context, stores.StoreProvider, rendercontext.RenderMode, ...rendercontext.Option) (*pipeline.PipelineResult, error)
	// HeldRender returns the error Execute would return for every input set, or nil.
	HeldRender(rendercontext.RenderMode) error
}

Pipeline validates the complete rendered configuration and all auxiliary output.

type Rejection

type Rejection struct {
	Store     string                 `json:"store"`
	Namespace string                 `json:"namespace"`
	Name      string                 `json:"name"`
	Deleted   bool                   `json:"deleted"`
	Reason    string                 `json:"reason"`
	Object    corev1.ObjectReference `json:"object"`
	// contains filtered or unexported fields
}

Rejection identifies a watched resource revision that has not been accepted.

type Service

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

Service retains validated inputs while independently valid changes advance.

func New

func New(validatingPipeline Pipeline, watches map[string]config.WatchedResource, logger *slog.Logger, callbacks ...Callbacks) *Service

New creates an input selector. The supplied pipeline must run full validation.

func (*Service) AcceptedInputs

func (s *Service) AcceptedInputs() (stores.StoreProvider, bool)

AcceptedInputs supplies HTTP validation with one accepted snapshot.

func (*Service) Execute

Execute validates observed updates, isolating failures against a validated baseline.

func (*Service) IsolatedInputs

func (s *Service) IsolatedInputs(ctx context.Context, observed stores.StoreProvider) (stores.StoreProvider, bool, error)

IsolatedInputs retains every observed change except exact rejected revisions.

func (*Service) ObservedInputs

func (s *Service) ObservedInputs(ctx context.Context, observed stores.StoreProvider) (stores.StoreProvider, error)

ObservedInputs projects live inputs onto the same revision family as reconciliation.

func (*Service) Snapshot

func (s *Service) Snapshot() (stores.StoreProvider, []Rejection, bool)

Snapshot returns one atomically accepted input set and its rejection diagnostics.

Jump to

Keyboard shortcuts

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