host

package
v0.0.0-...-2503396 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateStrategy

type CreateStrategy[E api.Object] interface {
	PrepareForCreate(obj E)
}

type Options

type Options[E api.Object] struct {
	Dir             string
	NewFunc         func() E
	CreateStrategy  CreateStrategy[E]
	WatchBufferSize int
	FieldIndexers   map[string]store.IndexerFunc[E]
	Log             logr.Logger
}

func (*Options[E]) Defaults

func (o *Options[E]) Defaults()

type Store

type Store[E api.Object] struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore[E api.Object](opts Options[E]) (*Store[E], error)

func (*Store[E]) Create

func (s *Store[E]) Create(_ context.Context, obj E) (E, error)

func (*Store[E]) Delete

func (s *Store[E]) Delete(_ context.Context, id string) error

func (*Store[E]) Get

func (s *Store[E]) Get(_ context.Context, id string) (E, error)

func (*Store[E]) List

func (s *Store[E]) List(ctx context.Context, opts ...store.ListOption) ([]E, error)

func (*Store[E]) Update

func (s *Store[E]) Update(_ context.Context, obj E) (E, error)

func (*Store[E]) Watch

func (s *Store[E]) Watch(ctx context.Context, opts ...store.ListOption) (store.Watch[E], error)

Jump to

Keyboard shortcuts

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