Documentation ¶
Index ¶
- func FromAppHandlerToHandler(sync AppHandler) generic.Handler
- func RegisterAppGeneratingHandler(ctx context.Context, controller AppController, apply apply.Apply, ...)
- func RegisterAppStatusHandler(ctx context.Context, controller AppController, condition condition.Cond, ...)
- func UpdateAppDeepCopyOnChange(client AppClient, obj *v1.App, handler func(obj *v1.App) (*v1.App, error)) (*v1.App, error)
- type AppCache
- type AppClient
- type AppController
- type AppGeneratingHandler
- type AppHandler
- type AppIndexer
- type AppStatusHandler
- type Interface
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
Types ¶
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 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