secret

package
v0.0.0-...-d927a5a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(kubeClient *kubernetes.Clientset, queue workqueue.RateLimitingInterface) *Manager

func (*Manager) GetSecret

func (m *Manager) GetSecret(namespace, routeName string) (*v1.Secret, error)

func (*Manager) Queue

func (*Manager) RegisterRoute

func (m *Manager) RegisterRoute(ctx context.Context, namespace, routeName, secretName string) error

func (*Manager) UnregisterRoute

func (m *Manager) UnregisterRoute(namespace, routeName string) error

func (*Manager) WithSecretHandler

func (m *Manager) WithSecretHandler(handler cache.ResourceEventHandlerFuncs) *Manager

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

func NewObjectKey(namespace, name string) ObjectKey

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(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(SecretEventHandlerRegistration) (*v1.Secret, error)
}

SecretMonitor helps in monitoring and handling a specific secret using singleItemMonitor.

func NewSecretMonitor

func NewSecretMonitor(kubeClient kubernetes.Interface) SecretMonitor

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL