Documentation
¶
Index ¶
- type AppInformer
- func (i *AppInformer) DeleteAppCallback() DeleteAppCallback
- func (i *AppInformer) EnsureSynced(d time.Duration) error
- func (i *AppInformer) NewAppCallback() NewAppCallback
- func (i *AppInformer) SetDeleteAppCallback(cb DeleteAppCallback)
- func (i *AppInformer) SetNewAppCallback(cb NewAppCallback)
- func (i *AppInformer) SetUpdateAppCallback(cb UpdateAppCallback)
- func (i *AppInformer) Start(stopch <-chan struct{})
- func (i *AppInformer) UpdateAppCallback() UpdateAppCallback
- type AppInformerOption
- func WithDeleteAppCallback(cb DeleteAppCallback) AppInformerOption
- func WithErrorCallback(cb ErrorCallback) AppInformerOption
- func WithFilterChain(fc *filter.Chain) AppInformerOption
- func WithListAppCallback(cb ListAppsCallback) AppInformerOption
- func WithMetrics(m *metrics.ApplicationWatcherMetrics) AppInformerOption
- func WithNamespaces(namespaces ...string) AppInformerOption
- func WithNewAppCallback(cb NewAppCallback) AppInformerOption
- func WithResyncDuration(d time.Duration) AppInformerOption
- func WithUpdateAppCallback(cb UpdateAppCallback) AppInformerOption
- type AppInformerOptions
- type DeleteAppCallback
- type ErrorCallback
- type ListAppsCallback
- type NewAppCallback
- type UpdateAppCallback
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppInformer ¶
type AppInformer struct { AppInformer cache.SharedIndexInformer AppLister applisters.ApplicationLister // contains filtered or unexported fields }
AppInformer is a filtering and customizable SharedIndexInformer for Argo CD Application resources in a cluster. It works across a configurable set of namespaces, lets you define a list of filters to indicate interest in the resource of a particular even and allows you to set up callbacks to handle the events.
func NewAppInformer ¶
func NewAppInformer(ctx context.Context, client appclientset.Interface, namespace string, opts ...AppInformerOption) *AppInformer
NewAppInformer returns a new application informer for a given namespace
func (*AppInformer) DeleteAppCallback ¶
func (i *AppInformer) DeleteAppCallback() DeleteAppCallback
DeleteAppCallback returns the delete application callback of the AppInformer
func (*AppInformer) EnsureSynced ¶
func (i *AppInformer) EnsureSynced(d time.Duration) error
EnsureSynced waits until either the AppInformer has fully synced or the timeout has been reached. In the latter case, an error will be returned. Note that this call blocks until either situation arises.
func (*AppInformer) NewAppCallback ¶
func (i *AppInformer) NewAppCallback() NewAppCallback
NewAppCallback returns the new application callback of the AppInformer
func (*AppInformer) SetDeleteAppCallback ¶
func (i *AppInformer) SetDeleteAppCallback(cb DeleteAppCallback)
SetDeleteAppCallback sets the delete application callback for the AppInformer
func (*AppInformer) SetNewAppCallback ¶
func (i *AppInformer) SetNewAppCallback(cb NewAppCallback)
SetNewAppCallback sets the new application callback for the AppInformer
func (*AppInformer) SetUpdateAppCallback ¶
func (i *AppInformer) SetUpdateAppCallback(cb UpdateAppCallback)
SetUpdateAppCallback sets the update application callback for the AppInformer
func (*AppInformer) Start ¶
func (i *AppInformer) Start(stopch <-chan struct{})
func (*AppInformer) UpdateAppCallback ¶
func (i *AppInformer) UpdateAppCallback() UpdateAppCallback
UpdateAppCallback returns the update application callback of the AppInformer
type AppInformerOption ¶
type AppInformerOption func(o *AppInformerOptions)
func WithDeleteAppCallback ¶
func WithDeleteAppCallback(cb DeleteAppCallback) AppInformerOption
WithDeleteAppCallback sets the DeleteAppCallback to be executed by the AppInformer
func WithErrorCallback ¶
func WithErrorCallback(cb ErrorCallback) AppInformerOption
WithErrorCallback sets the ErrorCallback to be executed by the AppInformer
func WithFilterChain ¶
func WithFilterChain(fc *filter.Chain) AppInformerOption
WithFilterChain sets the FilterChain to be used by the AppInformer
func WithListAppCallback ¶
func WithListAppCallback(cb ListAppsCallback) AppInformerOption
WithListAppCallback sets the ListAppsCallback to be called by the AppInformer
func WithMetrics ¶
func WithMetrics(m *metrics.ApplicationWatcherMetrics) AppInformerOption
WithMetrics sets the ApplicationMetrics instance to be used by the AppInformer
func WithNamespaces ¶
func WithNamespaces(namespaces ...string) AppInformerOption
WithNamespaces sets additional namespaces to be watched by the AppInformer
func WithNewAppCallback ¶
func WithNewAppCallback(cb NewAppCallback) AppInformerOption
WithNewAppCallback sets the NewAppCallback to be executed by the AppInformer
func WithResyncDuration ¶
func WithResyncDuration(d time.Duration) AppInformerOption
WithResyncDuration sets the resync duration to be used by the AppInformer's lister
func WithUpdateAppCallback ¶
func WithUpdateAppCallback(cb UpdateAppCallback) AppInformerOption
WithUpdateAppCallback sets the UpdateAppCallback to be executed by the AppInformer
type AppInformerOptions ¶
type AppInformerOptions struct {
// contains filtered or unexported fields
}
AppInformerOptions is a set of options for the AppInformer.
Options should not be modified concurrently, they are not implemented in a thread-safe way.
type DeleteAppCallback ¶
type DeleteAppCallback func(app *v1alpha1.Application)
DeleteAppCallback is executed when an app delete event is determined by the underlying watcher.
Callbacks are executed after the AppInformer validated that the application is allowed for processing.
type ErrorCallback ¶
ErrorCallback is executed when the watcher events encounter an error
type ListAppsCallback ¶
type ListAppsCallback func(apps []v1alpha1.Application) []v1alpha1.Application
ListAppsCallback is executed when the informer builds its cache. It receives all apps matching the configured label selector and must returned a list of apps to keep in the cache.
Callbacks are executed after the AppInformer validated that the application is good for processing.
type NewAppCallback ¶
type NewAppCallback func(app *v1alpha1.Application)
NewAppCallback is executed when a new app is determined by the underlying watcher.
Callbacks are executed after the AppInformer validated that the application is allowed for processing.
type UpdateAppCallback ¶
type UpdateAppCallback func(old *v1alpha1.Application, new *v1alpha1.Application)
UpdateAppCallback is executed when a change event for an app is determined by the underlying watcher.
Callbacks are executed after the AppInformer validated that the application is allowed for processing.