Documentation
¶
Overview ¶
Package inputisolation selects independently valid watched-resource updates.
Index ¶
- type Callbacks
- type Pipeline
- type Rejection
- type Service
- func (s *Service) AcceptedInputs() (stores.StoreProvider, bool)
- func (s *Service) Execute(ctx context.Context, observed stores.StoreProvider, ...) (*pipeline.PipelineResult, error)
- func (s *Service) IsolatedInputs(ctx context.Context, observed stores.StoreProvider) (stores.StoreProvider, bool, error)
- func (s *Service) ObservedInputs(ctx context.Context, observed stores.StoreProvider) (stores.StoreProvider, error)
- func (s *Service) Snapshot() (stores.StoreProvider, []Rejection, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 ¶
func (s *Service) Execute(ctx context.Context, observed stores.StoreProvider, mode rendercontext.RenderMode, opts ...rendercontext.Option) (*pipeline.PipelineResult, error)
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.