Documentation ¶
Index ¶
- func ExecLifecyclePreStart(handler Handler) error
- func HandleP0(ctx context.Context, handler ...HandleP0Func) (bool, error)
- func HandleP1[P1 interface{}](ctx context.Context, p1 P1, handler ...HandleP1Func[P1]) (bool, error)
- func HandleP1WithStop[P1 interface{}](ctx context.Context, p1 P1, handler ...HandleP1Func[P1]) (bool, error)
- func HandleP2[P1, P2 interface{}](ctx context.Context, p1 P1, p2 P2, handler ...HandleP2Func[P1, P2]) (bool, error)
- func HandleP2WithStop[P1, P2 interface{}](ctx context.Context, p1 P1, p2 P2, handler ...HandleP2Func[P1, P2]) (bool, error)
- func HandleP3[P1, P2, P3 interface{}](ctx context.Context, p1 P1, p2 P2, p3 P3, handler ...HandleP3Func[P1, P2, P3]) (bool, error)
- func HandleP3WithCondition[P1, P2, P3 interface{}](ctx context.Context, conditions *api.ConditionList, ...) (bool, error)
- func HandleP3WithStop[P1, P2, P3 interface{}](ctx context.Context, p1 P1, p2 P2, p3 P3, handler ...HandleP3Func[P1, P2, P3]) (bool, error)
- func HandleP4[P1, P2, P3, P4 interface{}](ctx context.Context, p1 P1, p2 P2, p3 P3, p4 P4, ...) (bool, error)
- func HandleP4WithCondition[P1, P2, P3, P4 interface{}](ctx context.Context, conditions *api.ConditionList, ...) (bool, error)
- func HandleP4WithStop[P1, P2, P3, P4 interface{}](ctx context.Context, p1 P1, p2 P2, p3 P3, p4 P4, ...) (bool, error)
- func HandleP5[P1, P2, P3, P4, P5 interface{}](ctx context.Context, p1 P1, p2 P2, p3 P3, p4 P4, p5 P5, ...) (bool, error)
- func HandleP5WithCondition[P1, P2, P3, P4, P5 interface{}](ctx context.Context, conditions *api.ConditionList, ...) (bool, error)
- func HandleP5WithStop[P1, P2, P3, P4, P5 interface{}](ctx context.Context, p1 P1, p2 P2, p3 P3, p4 P4, p5 P5, ...) (bool, error)
- func HandleP6[P1, P2, P3, P4, P5, P6 interface{}](ctx context.Context, p1 P1, p2 P2, p3 P3, p4 P4, p5 P5, p6 P6, ...) (bool, error)
- func HandleP6WithCondition[P1, P2, P3, P4, P5, P6 interface{}](ctx context.Context, conditions *api.ConditionList, ...) (bool, error)
- func HandleP6WithStop[P1, P2, P3, P4, P5, P6 interface{}](ctx context.Context, p1 P1, p2 P2, p3 P3, p4 P4, p5 P5, p6 P6, ...) (bool, error)
- func HandleP9[P1, P2, P3, P4, P5, P6, P7, P8, P9 interface{}](ctx context.Context, p1 P1, p2 P2, p3 P3, p4 P4, p5 P5, p6 P6, p7 P7, p8 P8, ...) (bool, error)
- func HandleP9WithCondition[P1, P2, P3, P4, P5, P6, P7, P8, P9 interface{}](ctx context.Context, conditions *api.ConditionList, ...) (bool, error)
- func HandleP9WithStop[P1, P2, P3, P4, P5, P6, P7, P8, P9 interface{}](ctx context.Context, p1 P1, p2 P2, p3 P3, p4 P4, p5 P5, p6 P6, p7 P7, p8 P8, ...) (bool, error)
- func IsReconcile(err error) bool
- func IsStop(err error) bool
- func Reconcile(msg string, args ...interface{}) error
- func Stop(msg string, args ...interface{}) error
- func WithArangoBackupUpdateStatusInterfaceRetry(ctx context.Context, ...) (*backupApi.ArangoBackup, error)
- func WithArangoBatchJobUpdateStatusInterfaceRetry(ctx context.Context, ...) (*mlApi.ArangoMLBatchJob, error)
- func WithArangoCronJobUpdateStatusInterfaceRetry(ctx context.Context, ...) (*mlApi.ArangoMLCronJob, error)
- func WithArangoExtensionUpdateStatusInterfaceRetry(ctx context.Context, ...) (*mlApi.ArangoMLExtension, error)
- func WithArangoStorageUpdateStatusInterfaceRetry(ctx context.Context, ...) (*mlApi.ArangoMLStorage, error)
- func WithCondition(conditions *api.ConditionList, condition api.ConditionType, changed bool, ...) (bool, error)
- func WithUpdateStatusInterface[S interface{}, T Object[S]](ctx context.Context, client UpdateStatusInterface[S, T], obj T, status S, ...) (T, error)
- func WithUpdateStatusInterfaceRetry[S interface{}, T Object[S]](ctx context.Context, client UpdateStatusInterface[S, T], obj T, status S, ...) (T, error)
- type GetInterface
- type HandleP0Func
- type HandleP1Func
- type HandleP2Func
- type HandleP3Func
- type HandleP4Func
- type HandleP5Func
- type HandleP6Func
- type HandleP9Func
- type Handler
- type InformerFilter
- type LifecyclePreStart
- type Object
- type Operator
- type Starter
- type UpdateStatusInterface
- type UpdateStatusInterfaceClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecLifecyclePreStart ¶
ExecLifecyclePreStart execute PreStart step on handler if interface is implemented
func HandleP1 ¶
func HandleP1[P1 interface{}](ctx context.Context, p1 P1, handler ...HandleP1Func[P1]) (bool, error)
func HandleP1WithStop ¶
func HandleP1WithStop[P1 interface{}](ctx context.Context, p1 P1, handler ...HandleP1Func[P1]) (bool, error)
func HandleP2 ¶
func HandleP2[P1, P2 interface{}](ctx context.Context, p1 P1, p2 P2, handler ...HandleP2Func[P1, P2]) (bool, error)
func HandleP2WithStop ¶
func HandleP2WithStop[P1, P2 interface{}](ctx context.Context, p1 P1, p2 P2, handler ...HandleP2Func[P1, P2]) (bool, error)
func HandleP3 ¶
func HandleP3[P1, P2, P3 interface{}](ctx context.Context, p1 P1, p2 P2, p3 P3, handler ...HandleP3Func[P1, P2, P3]) (bool, error)
func HandleP3WithCondition ¶
func HandleP3WithCondition[P1, P2, P3 interface{}](ctx context.Context, conditions *api.ConditionList, condition api.ConditionType, p1 P1, p2 P2, p3 P3, handler ...HandleP3Func[P1, P2, P3]) (bool, error)
func HandleP3WithStop ¶
func HandleP3WithStop[P1, P2, P3 interface{}](ctx context.Context, p1 P1, p2 P2, p3 P3, handler ...HandleP3Func[P1, P2, P3]) (bool, error)
func HandleP4 ¶
func HandleP4[P1, P2, P3, P4 interface{}](ctx context.Context, p1 P1, p2 P2, p3 P3, p4 P4, handler ...HandleP4Func[P1, P2, P3, P4]) (bool, error)
func HandleP4WithCondition ¶
func HandleP4WithCondition[P1, P2, P3, P4 interface{}](ctx context.Context, conditions *api.ConditionList, condition api.ConditionType, p1 P1, p2 P2, p3 P3, p4 P4, handler ...HandleP4Func[P1, P2, P3, P4]) (bool, error)
func HandleP4WithStop ¶
func HandleP4WithStop[P1, P2, P3, P4 interface{}](ctx context.Context, p1 P1, p2 P2, p3 P3, p4 P4, handler ...HandleP4Func[P1, P2, P3, P4]) (bool, error)
func HandleP5 ¶
func HandleP5[P1, P2, P3, P4, P5 interface{}](ctx context.Context, p1 P1, p2 P2, p3 P3, p4 P4, p5 P5, handler ...HandleP5Func[P1, P2, P3, P4, P5]) (bool, error)
func HandleP5WithCondition ¶
func HandleP5WithCondition[P1, P2, P3, P4, P5 interface{}](ctx context.Context, conditions *api.ConditionList, condition api.ConditionType, p1 P1, p2 P2, p3 P3, p4 P4, p5 P5, handler ...HandleP5Func[P1, P2, P3, P4, P5]) (bool, error)
func HandleP5WithStop ¶
func HandleP5WithStop[P1, P2, P3, P4, P5 interface{}](ctx context.Context, p1 P1, p2 P2, p3 P3, p4 P4, p5 P5, handler ...HandleP5Func[P1, P2, P3, P4, P5]) (bool, error)
func HandleP6 ¶
func HandleP6[P1, P2, P3, P4, P5, P6 interface{}](ctx context.Context, p1 P1, p2 P2, p3 P3, p4 P4, p5 P5, p6 P6, handler ...HandleP6Func[P1, P2, P3, P4, P5, P6]) (bool, error)
func HandleP6WithCondition ¶
func HandleP6WithCondition[P1, P2, P3, P4, P5, P6 interface{}](ctx context.Context, conditions *api.ConditionList, condition api.ConditionType, p1 P1, p2 P2, p3 P3, p4 P4, p5 P5, p6 P6, handler ...HandleP6Func[P1, P2, P3, P4, P5, P6]) (bool, error)
func HandleP6WithStop ¶
func HandleP6WithStop[P1, P2, P3, P4, P5, P6 interface{}](ctx context.Context, p1 P1, p2 P2, p3 P3, p4 P4, p5 P5, p6 P6, handler ...HandleP6Func[P1, P2, P3, P4, P5, P6]) (bool, error)
func HandleP9 ¶
func HandleP9[P1, P2, P3, P4, P5, P6, P7, P8, P9 interface{}](ctx context.Context, p1 P1, p2 P2, p3 P3, p4 P4, p5 P5, p6 P6, p7 P7, p8 P8, p9 P9, handler ...HandleP9Func[P1, P2, P3, P4, P5, P6, P7, P8, P9]) (bool, error)
func HandleP9WithCondition ¶
func HandleP9WithCondition[P1, P2, P3, P4, P5, P6, P7, P8, P9 interface{}](ctx context.Context, conditions *api.ConditionList, condition api.ConditionType, p1 P1, p2 P2, p3 P3, p4 P4, p5 P5, p6 P6, p7 P7, p8 P8, p9 P9, handler ...HandleP9Func[P1, P2, P3, P4, P5, P6, P7, P8, P9]) (bool, error)
func HandleP9WithStop ¶
func HandleP9WithStop[P1, P2, P3, P4, P5, P6, P7, P8, P9 interface{}](ctx context.Context, p1 P1, p2 P2, p3 P3, p4 P4, p5 P5, p6 P6, p7 P7, p8 P8, p9 P9, handler ...HandleP9Func[P1, P2, P3, P4, P5, P6, P7, P8, P9]) (bool, error)
func IsReconcile ¶
func WithArangoBackupUpdateStatusInterfaceRetry ¶
func WithArangoBackupUpdateStatusInterfaceRetry(ctx context.Context, client UpdateStatusInterface[backupApi.ArangoBackupStatus, *backupApi.ArangoBackup], obj *backupApi.ArangoBackup, status backupApi.ArangoBackupStatus, opts meta.UpdateOptions) (*backupApi.ArangoBackup, error)
func WithArangoBatchJobUpdateStatusInterfaceRetry ¶
func WithArangoBatchJobUpdateStatusInterfaceRetry(ctx context.Context, client UpdateStatusInterface[mlApi.ArangoMLBatchJobStatus, *mlApi.ArangoMLBatchJob], obj *mlApi.ArangoMLBatchJob, status mlApi.ArangoMLBatchJobStatus, opts meta.UpdateOptions) (*mlApi.ArangoMLBatchJob, error)
func WithArangoCronJobUpdateStatusInterfaceRetry ¶
func WithArangoCronJobUpdateStatusInterfaceRetry(ctx context.Context, client UpdateStatusInterface[mlApi.ArangoMLCronJobStatus, *mlApi.ArangoMLCronJob], obj *mlApi.ArangoMLCronJob, status mlApi.ArangoMLCronJobStatus, opts meta.UpdateOptions) (*mlApi.ArangoMLCronJob, error)
func WithArangoExtensionUpdateStatusInterfaceRetry ¶
func WithArangoExtensionUpdateStatusInterfaceRetry(ctx context.Context, client UpdateStatusInterface[mlApi.ArangoMLExtensionStatus, *mlApi.ArangoMLExtension], obj *mlApi.ArangoMLExtension, status mlApi.ArangoMLExtensionStatus, opts meta.UpdateOptions) (*mlApi.ArangoMLExtension, error)
func WithArangoStorageUpdateStatusInterfaceRetry ¶
func WithArangoStorageUpdateStatusInterfaceRetry(ctx context.Context, client UpdateStatusInterface[mlApi.ArangoMLStorageStatus, *mlApi.ArangoMLStorage], obj *mlApi.ArangoMLStorage, status mlApi.ArangoMLStorageStatus, opts meta.UpdateOptions) (*mlApi.ArangoMLStorage, error)
func WithCondition ¶
func WithCondition(conditions *api.ConditionList, condition api.ConditionType, changed bool, err error) (bool, error)
func WithUpdateStatusInterface ¶
func WithUpdateStatusInterface[S interface{}, T Object[S]](ctx context.Context, client UpdateStatusInterface[S, T], obj T, status S, opts meta.UpdateOptions) (T, error)
func WithUpdateStatusInterfaceRetry ¶
func WithUpdateStatusInterfaceRetry[S interface{}, T Object[S]](ctx context.Context, client UpdateStatusInterface[S, T], obj T, status S, opts meta.UpdateOptions) (T, error)
Types ¶
type GetInterface ¶
type HandleP1Func ¶
type HandleP2Func ¶
type HandleP3Func ¶
type HandleP4Func ¶
type HandleP5Func ¶
type HandleP6Func ¶
type HandleP9Func ¶
type Handler ¶
type Handler interface { Name() string Handle(ctx context.Context, item operation.Item) error CanBeHandled(item operation.Item) bool }
Handler define interface for operator actions
type InformerFilter ¶
type LifecyclePreStart ¶
LifecyclePreStart interface executed before operator starts
type Operator ¶
type Operator interface { // Define prometheus collector interface prometheus.Collector Name() string Namespace() string Image() string Start(threadiness int, stopCh <-chan struct{}) error RegisterInformer(informer cache.SharedIndexInformer, group, version, kind string, filters ...InformerFilter) error RegisterStarter(starter Starter) error RegisterHandler(handler Handler) error EnqueueItem(item operation.Item) ProcessItem(item operation.Item) error }
Operator interface for operator core functionality
func NewOperator ¶
NewOperator creates new operator
type Starter ¶
type Starter interface {
Start(stopCh <-chan struct{})
}
Starter interface used by Operator to start new GoRoutines
type UpdateStatusInterface ¶
type UpdateStatusInterface[S interface{}, T Object[S]] interface { GetInterface[S, T] UpdateStatus(ctx context.Context, in T, options meta.UpdateOptions) (T, error) }
type UpdateStatusInterfaceClient ¶
type UpdateStatusInterfaceClient[S interface{}, T Object[S]] func(namespace string) UpdateStatusInterface[S, T]
Source Files ¶
Click to show internal directories.
Click to hide internal directories.