controllerstate

package
v1.16.4 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MPL-2.0 Imports: 10 Imported by: 0 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

Overview

Package controllerstate provides adapter which filters access to the resource state by controller inputs/outputs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StateAdapter

type StateAdapter struct {
	OwnedState *owned.State
	Cache      *cache.ResourceCache
	Name       string

	UpdateLimiter *rate.Limiter
	Logger        *zap.Logger

	Inputs  []controller.Input
	Outputs []controller.Output

	WarnOnUncachedReads bool
}

StateAdapter implements filtered access to the resource state by controller inputs/outputs.

If the read cache is enabled for a resource type, controller.Reader interface will be redirected to the cache.

func (*StateAdapter) AddFinalizer

func (adapter *StateAdapter) AddFinalizer(ctx context.Context, resourcePointer resource.Pointer, fins ...resource.Finalizer) error

AddFinalizer implements controller.Runtime interface.

func (*StateAdapter) ContextWithTeardown

func (adapter *StateAdapter) ContextWithTeardown(ctx context.Context, resourcePointer resource.Pointer) (context.Context, error)

ContextWithTeardown implements controller.Runtime interface.

func (*StateAdapter) Create

func (adapter *StateAdapter) Create(ctx context.Context, r resource.Resource, options ...controller.CreateOption) error

Create implements controller.Runtime interface.

func (*StateAdapter) Destroy

func (adapter *StateAdapter) Destroy(ctx context.Context, resourcePointer resource.Pointer, opOpts ...controller.DeleteOption) error

Destroy implements controller.Runtime interface.

func (*StateAdapter) Get

func (adapter *StateAdapter) Get(ctx context.Context, resourcePointer resource.Pointer, opts ...state.GetOption) (resource.Resource, error)

Get implements controller.Runtime interface.

func (*StateAdapter) GetUncached added in v0.4.6

func (adapter *StateAdapter) GetUncached(ctx context.Context, resourcePointer resource.Pointer, opts ...state.GetOption) (resource.Resource, error)

GetUncached implements controller.Runtime interface.

func (*StateAdapter) List

func (adapter *StateAdapter) List(ctx context.Context, resourceKind resource.Kind, opts ...state.ListOption) (resource.List, error)

List implements controller.Runtime interface.

func (*StateAdapter) ListUncached added in v0.4.6

func (adapter *StateAdapter) ListUncached(ctx context.Context, resourceKind resource.Kind, opts ...state.ListOption) (resource.List, error)

ListUncached implements controller.Runtime interface.

func (*StateAdapter) Modify

func (adapter *StateAdapter) Modify(
	ctx context.Context, emptyResource resource.Resource, updateFunc func(resource.Resource) error, options ...controller.ModifyOption,
) error

Modify implements controller.Runtime interface.

func (*StateAdapter) ModifyWithResult

func (adapter *StateAdapter) ModifyWithResult(
	ctx context.Context, emptyResource resource.Resource, updateFunc func(resource.Resource) error, options ...controller.ModifyOption,
) (resource.Resource, error)

ModifyWithResult implements controller.Runtime interface.

func (*StateAdapter) RemoveFinalizer

func (adapter *StateAdapter) RemoveFinalizer(ctx context.Context, resourcePointer resource.Pointer, fins ...resource.Finalizer) error

RemoveFinalizer implements controller.Runtime interface.

func (*StateAdapter) Teardown

func (adapter *StateAdapter) Teardown(ctx context.Context, resourcePointer resource.Pointer, opOpts ...controller.DeleteOption) (bool, error)

Teardown implements controller.Runtime interface.

func (*StateAdapter) Update

func (adapter *StateAdapter) Update(ctx context.Context, newResource resource.Resource) error

Update implements controller.Runtime interface.

Jump to

Keyboard shortcuts

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