eventsource

package
v0.0.0-...-dea60c0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventSource

type EventSource[T any] struct {
	// contains filtered or unexported fields
}

func New

func New[T any](f InformerFactory, h Handlers[T]) *EventSource[T]

func (*EventSource[T]) OnAdd

func (ig *EventSource[T]) OnAdd(obj interface{})

func (*EventSource[T]) OnDelete

func (ig *EventSource[T]) OnDelete(obj interface{})

func (*EventSource[T]) OnUpdate

func (ig *EventSource[T]) OnUpdate(oldObj, newObj interface{})

type Handlers

type Handlers[T any] struct {
	AddFunc    func(obj *T)
	UpdateFunc func(oldObj, newObj *T)
	DeleteFunc func(obj *T)
}

type InformerFactory

type InformerFactory interface {
	Informer() cache.SharedIndexInformer
}

Jump to

Keyboard shortcuts

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