v1

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2025 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEventHandler added in v0.3.0

Types

type Controller added in v0.3.0

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

func NewController added in v0.3.0

func NewController(
	informer cache.SharedIndexInformer,
	log logr.Logger,
) *Controller

func (*Controller) Announce added in v0.3.0

func (c *Controller) Announce(obj interface{}) error

func (*Controller) Stream added in v0.3.0

func (c *Controller) Stream(ctx context.Context, sink *Sink) error

type EventHandler added in v0.3.0

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

func (*EventHandler) OnAdd added in v0.3.0

func (e *EventHandler) OnAdd(obj interface{}, _ bool)

func (*EventHandler) OnDelete added in v0.3.0

func (e *EventHandler) OnDelete(obj interface{})

func (*EventHandler) OnUpdate added in v0.3.0

func (e *EventHandler) OnUpdate(_, newObj interface{})

type EventHandlerItem added in v0.3.0

type EventHandlerItem struct {
	Type EventType
	Id   types.UUID
	KKey string
}

type EventType added in v0.3.0

type EventType string
const EventAdd EventType = "ADDED"
const EventDelete EventType = "DELETED"
const EventUpdate EventType = "UPDATED"

type Feature added in v0.3.0

type Feature func(*Features)

func WithNoDelete added in v0.3.0

func WithNoDelete() Feature

func WithNoWarumup added in v0.3.0

func WithNoWarumup() Feature

func WithOnDelete added in v0.3.0

func WithOnDelete(fn database.OnSuccess[any]) Feature

func WithOnUpsert added in v0.3.0

func WithOnUpsert(fn database.OnSuccess[any]) Feature

type Features added in v0.3.0

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

func NewFeatures added in v0.3.0

func NewFeatures(features ...Feature) *Features

func (*Features) NoDelete added in v0.3.0

func (f *Features) NoDelete() bool

func (*Features) NoWarmup added in v0.3.0

func (f *Features) NoWarmup() bool

func (*Features) OnDelete added in v0.3.0

func (f *Features) OnDelete() database.OnSuccess[any]

func (*Features) OnUpsert added in v0.3.0

func (f *Features) OnUpsert() database.OnSuccess[any]

type Item added in v0.3.0

type Item struct {
	Key  string
	Item *kmetav1.Object
}

type Sink added in v0.3.0

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

func NewSink added in v0.3.0

func NewSink(upsertFunc func(*Item) interface{}, deleteFunc func(interface{}) interface{}) *Sink

func (*Sink) Delete added in v0.3.0

func (s *Sink) Delete(ctx context.Context, key interface{}) error

func (*Sink) DeleteCh added in v0.3.0

func (s *Sink) DeleteCh() <-chan interface{}

func (*Sink) Error added in v0.3.0

func (s *Sink) Error(ctx context.Context, err error) error

func (*Sink) ErrorCh added in v0.3.0

func (s *Sink) ErrorCh() <-chan error

func (*Sink) Upsert added in v0.3.0

func (s *Sink) Upsert(ctx context.Context, item *Item) error

func (*Sink) UpsertCh added in v0.3.0

func (s *Sink) UpsertCh() <-chan interface{}

type Sync

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

func NewSync

func NewSync(
	db *database.Database,
	informer cache.SharedIndexInformer,
	log logr.Logger,
	factory func() schemav1.Resource,
) *Sync

func (*Sync) Run

func (s *Sync) Run(ctx context.Context, features ...Feature) error

Jump to

Keyboard shortcuts

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