Documentation ¶
Index ¶
- func HandleIntegrationEvents(ctx context.Context, integration *v1.Integration, ...) error
- func HandleIntegrationPlatformEvents(ctx context.Context, p *v1.IntegrationPlatform, ...) error
- func HandleIntegrationStateChanges(ctx context.Context, integration *v1.Integration, ...) (*v1.IntegrationPhase, error)
- func HandlePlatformStateChanges(ctx context.Context, platform *v1.IntegrationPlatform, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleIntegrationEvents ¶
func HandleIntegrationEvents(ctx context.Context, integration *v1.Integration, handler func(event *corev1.Event) bool) error
HandleIntegrationEvents watches all events related to the given integration.
watch.HandleIntegrationEvents(o.Context, integration, func(event *corev1.Event) bool { println(event.Message) return true })
This function blocks until the handler function returns true or either the events channel or the context is closed.
func HandleIntegrationPlatformEvents ¶
func HandleIntegrationPlatformEvents(ctx context.Context, p *v1.IntegrationPlatform, handler func(event *corev1.Event) bool) error
HandleIntegrationPlatformEvents watches all events related to the given integration platform.
watch.HandleIntegrationPlatformEvents(o.Context, platform, func(event *corev1.Event) bool { println(event.Message) return true })
This function blocks until the handler function returns true or either the events channel or the context is closed.
func HandleIntegrationStateChanges ¶
func HandleIntegrationStateChanges(ctx context.Context, integration *v1.Integration, handler func(integration *v1.Integration) bool) (*v1.IntegrationPhase, error)
HandleIntegrationStateChanges watches a integration resource and invoke the given handler when its status changes.
err := watch.HandleIntegrationStateChanges(ctx, integration, func(i *v1.Integration) bool { if i.Status.Phase == v1.IntegrationPhaseRunning { return false } return true })
This function blocks until the handler function returns true or either the events channel or the context is closed.
func HandlePlatformStateChanges ¶
func HandlePlatformStateChanges(ctx context.Context, platform *v1.IntegrationPlatform, handler func(platform *v1.IntegrationPlatform) bool) error
HandlePlatformStateChanges watches a platform resource and invoke the given handler when its status changes.
err := watch.HandlePlatformStateChanges(ctx, platform, func(i *v1.IntegrationPlatform) bool { if i.Status.Phase == v1.IntegrationPlatformPhaseReady { return false } return true })
This function blocks until the handler function returns true or either the events channel or the context is closed.
Types ¶
This section is empty.