store

package
v1.19.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrStoreUninitialized = errors.New("the store has not initialized yet")
)

Functions

This section is empty.

Types

type BGPCPResourceStore

type BGPCPResourceStore[T k8sRuntime.Object] interface {
	// GetByKey returns the latest version of the object with given key.
	GetByKey(key resource.Key) (item T, exists bool, err error)

	// List returns all items currently in the store.
	List() (items []T, err error)
}

BGPCPResourceStore is a wrapper around the resource.Store for the BGP Control Plane reconcilers usage. It automatically signals the BGP Control Plane whenever an event happens on the resource.

func InitMockStore

func InitMockStore[T runtime.Object](objects []T) BGPCPResourceStore[T]

func NewBGPCPResourceStore

func NewBGPCPResourceStore[T k8sRuntime.Object](params bgpCPResourceStoreParams[T]) BGPCPResourceStore[T]

type MockBGPCPResourceStore

type MockBGPCPResourceStore[T runtime.Object] struct {
	// contains filtered or unexported fields
}

func NewMockBGPCPResourceStore

func NewMockBGPCPResourceStore[T runtime.Object]() *MockBGPCPResourceStore[T]

func (*MockBGPCPResourceStore[T]) Delete

func (mds *MockBGPCPResourceStore[T]) Delete(key resource.Key)

func (*MockBGPCPResourceStore[T]) GetByKey

func (mds *MockBGPCPResourceStore[T]) GetByKey(key resource.Key) (item T, exists bool, err error)

func (*MockBGPCPResourceStore[T]) List

func (mds *MockBGPCPResourceStore[T]) List() ([]T, error)

func (*MockBGPCPResourceStore[T]) Upsert

func (mds *MockBGPCPResourceStore[T]) Upsert(obj T)

Jump to

Keyboard shortcuts

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