v1

package
v1.2.2-rc3 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromAppHandlerToHandler

func FromAppHandlerToHandler(sync AppHandler) generic.Handler

func RegisterAppGeneratingHandler

func RegisterAppGeneratingHandler(ctx context.Context, controller AppController, apply apply.Apply,
	condition condition.Cond, name string, handler AppGeneratingHandler, opts *generic.GeneratingHandlerOptions)

RegisterAppGeneratingHandler configures a AppController to execute a AppGeneratingHandler for every events observed, passing the returned objects to the provided apply.Apply. If a non-empty condition is provided, it will be updated in the status conditions for every handler execution

func RegisterAppStatusHandler

func RegisterAppStatusHandler(ctx context.Context, controller AppController, condition condition.Cond, name string, handler AppStatusHandler)

RegisterAppStatusHandler configures a AppController to execute a AppStatusHandler for every events observed. If a non-empty condition is provided, it will be updated in the status conditions for every handler execution

func UpdateAppDeepCopyOnChange

func UpdateAppDeepCopyOnChange(client AppClient, obj *v1.App, handler func(obj *v1.App) (*v1.App, error)) (*v1.App, error)

Types

type AppCache

type AppCache interface {
	Get(namespace, name string) (*v1.App, error)
	List(namespace string, selector labels.Selector) ([]*v1.App, error)

	AddIndexer(indexName string, indexer AppIndexer)
	GetByIndex(indexName, key string) ([]*v1.App, error)
}

type AppClient

type AppClient interface {
	Create(*v1.App) (*v1.App, error)
	Update(*v1.App) (*v1.App, error)
	UpdateStatus(*v1.App) (*v1.App, error)
	Delete(namespace, name string, options *metav1.DeleteOptions) error
	Get(namespace, name string, options metav1.GetOptions) (*v1.App, error)
	List(namespace string, opts metav1.ListOptions) (*v1.AppList, error)
	Watch(namespace string, opts metav1.ListOptions) (watch.Interface, error)
	Patch(namespace, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.App, err error)
}

type AppController

type AppController interface {
	generic.ControllerMeta
	AppClient

	OnChange(ctx context.Context, name string, sync AppHandler)
	OnRemove(ctx context.Context, name string, sync AppHandler)
	Enqueue(namespace, name string)
	EnqueueAfter(namespace, name string, duration time.Duration)

	Cache() AppCache
}

func NewAppController

func NewAppController(gvk schema.GroupVersionKind, resource string, namespaced bool, controller controller.SharedControllerFactory) AppController

type AppGeneratingHandler

type AppGeneratingHandler func(obj *v1.App, status v1.ReleaseStatus) ([]runtime.Object, v1.ReleaseStatus, error)

AppGeneratingHandler is the top-level handler that is executed for every App event. It extends AppStatusHandler by a returning a slice of child objects to be passed to apply.Apply

type AppHandler

type AppHandler func(string, *v1.App) (*v1.App, error)

type AppIndexer

type AppIndexer func(obj *v1.App) ([]string, error)

type AppStatusHandler

type AppStatusHandler func(obj *v1.App, status v1.ReleaseStatus) (v1.ReleaseStatus, error)

AppStatusHandler is executed for every added or modified App. Should return the new status to be updated

type Interface

type Interface interface {
	App() AppController
}

func New

func New(controllerFactory controller.SharedControllerFactory) Interface

Jump to

Keyboard shortcuts

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