handler

package
v0.0.0-...-e73b65a Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventChannel

type EventChannel chan event.GenericEvent

Generic event.

type Handler

type Handler struct {
	libweb.StockEventHandler
	// k8s client.
	client.Client
	// contains filtered or unexported fields
}

Provider watch event handler.

func New

func New(
	client client.Client,
	channel chan event.GenericEvent,
	provider *api.Provider) (h *Handler, err error)

Handler factory.

func (*Handler) End

func (r *Handler) End()

Watch ended by peer. The database has been closed.

func (*Handler) Enqueue

func (r *Handler) Enqueue(event event.GenericEvent)

Enqueue reconcile request.

func (*Handler) Error

func (r *Handler) Error(w *libweb.Watch, err error)

Watch error. Repair the watch.

func (*Handler) Inventory

func (r *Handler) Inventory() web.Client

Get an inventory client.

func (*Handler) Match

func (r *Handler) Match(object meta.Object, ref core.ObjectReference) bool

Ref matches object.

func (*Handler) MatchProvider

func (r *Handler) MatchProvider(ref core.ObjectReference) bool

Match provider.

func (*Handler) Provider

func (r *Handler) Provider() *api.Provider

The associated provider.

func (*Handler) Started

func (r *Handler) Started(id uint64)

Inventory watch has parity.

type ProviderMap

type ProviderMap map[types.UID]watchMap

Provider map keyed by provider.UID.

type WatchManager

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

Watch manager.

func (*WatchManager) Deleted

func (m *WatchManager) Deleted(provider *api.Provider)

A provider has been deleted. Delete associated watches.

func (*WatchManager) Ensure

func (m *WatchManager) Ensure(
	provider *api.Provider,
	resource interface{},
	handler libweb.EventHandler) (watch *libweb.Watch, err error)

Ensure watch has been created. An existing watch that is not `alive` will be replaced.

Jump to

Keyboard shortcuts

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