Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ObjectKey ¶
type ObjectKey struct { // Namespace is the namespace in which the resource is located. Namespace string // Name denotes metadata.name of a resource being monitored by informer Name string }
ObjectKey represents the unique identifier for a resource, used to access it in the cache.
func NewObjectKey ¶
NewObjectKey creates a new ObjectKey for the given namespace and name.
type SecretEventHandlerRegistration ¶
type SecretEventHandlerRegistration interface { cache.ResourceEventHandlerRegistration GetKey() ObjectKey GetHandler() cache.ResourceEventHandlerRegistration }
SecretEventHandlerRegistration is for registering and unregistering event handlers for secret monitoring.
type SecretMonitor ¶
type SecretMonitor interface { // AddSecretEventHandler adds a secret event handler to the monitor for a specific secret in the given namespace. // The handler will be notified of events related to the "specified" secret only. // The returned SecretEventHandlerRegistration can be used to later remove the handler. AddSecretEventHandler(ctx context.Context, namespace, secretName string, handler cache.ResourceEventHandler) (SecretEventHandlerRegistration, error) // RemoveSecretEventHandler removes a previously added secret event handler using the provided registration. // If the handler is not found or if there is an issue removing it, an error is returned. RemoveSecretEventHandler(handlerRegistration SecretEventHandlerRegistration) error // GetSecret retrieves the secret object from the informer's cache using the provided SecretEventHandlerRegistration. // This allows accessing the latest state of the secret without making an API call. GetSecret(ctx context.Context, handlerRegistration SecretEventHandlerRegistration) (*corev1.Secret, error) }
SecretMonitor helps in monitoring and handling a specific secret using singleItemMonitor.
func NewSecretMonitor ¶
func NewSecretMonitor(kubeClient kubernetes.Interface) SecretMonitor
Click to show internal directories.
Click to hide internal directories.