controller

package
v0.0.0-...-22d8ab2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IndexChan

func IndexChan[T any, PT types.Object[T]](watcher types.WatchInterface[T, PT], indexer Indexer[PT]) chan string

Types

type Controller

type Controller[T any, PT types.Object[T]] struct {
	// contains filtered or unexported fields
}

func NewController

func NewController[T any, PT types.Object[T]](root types.ObjectAPI[T, PT]) (*Controller[T, PT], error)

func NewEmptyController

func NewEmptyController[T any, PT types.Object[T]](root types.ObjectAPI[T, PT]) *Controller[T, PT]

func (*Controller[T, PT]) Run

func (c *Controller[T, PT]) Run(action RunAction[T])

func (*Controller[T, PT]) Watches

func (c *Controller[T, PT]) Watches(r chan string) *Controller[T, PT]

type Indexer

type Indexer[T any] func(T) string

func KeyFromLabel

func KeyFromLabel[T any, PT types.Object[T]](label string) Indexer[PT]

type RunAction

type RunAction[T any] func(T) error

Jump to

Keyboard shortcuts

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