Documentation ¶
Overview ¶
registry keeps a local version of all the managed secret states.
Index ¶
- type Registry
- func (r *Registry) OwnedSecretsWithUID(uid types.UID) []types.NamespacedName
- func (r *Registry) RegisterOwnedSecret(managerUID types.UID, name types.NamespacedName) error
- func (r *Registry) RegisterSecret(name types.NamespacedName, uid types.UID) error
- func (r *Registry) SecretWithName(name types.NamespacedName) *Secret
- func (r *Registry) SecretWithOwnedSecretName(ownedSecretName types.NamespacedName) *Secret
- func (r *Registry) SecretWithUID(uid types.UID) *Secret
- func (r *Registry) Secrets() []types.NamespacedName
- func (r *Registry) UnregisterOwnedSecret(name types.NamespacedName) error
- func (r *Registry) UnregisterSecret(uid types.UID) error
- type Secret
- type SecretNameAlreadyExistsErr
- type SecretNotFoundErr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry keeps in memory all states of the managed secrets and their owned secrets.
- A managed secret is a secret watched by the controller, which must be synced.
- An owned secret is a secret created by the controller, which is a copy of a managed secret.
func (*Registry) OwnedSecretsWithUID ¶
func (r *Registry) OwnedSecretsWithUID(uid types.UID) []types.NamespacedName
Secrets returns all register owned secret's names.
func (*Registry) RegisterOwnedSecret ¶
RegisterOwnedSecret adds a new owned secret to the registry.
func (*Registry) RegisterSecret ¶
RegisterSecret adds a new secret to the registry.
func (*Registry) SecretWithName ¶
func (r *Registry) SecretWithName(name types.NamespacedName) *Secret
SecretWithName returns a registered secret with the given name, or nil if doesn't exists.
func (*Registry) SecretWithOwnedSecretName ¶
func (r *Registry) SecretWithOwnedSecretName(ownedSecretName types.NamespacedName) *Secret
SecretWithName returns a registered secret with the given NamespacedName, or nil if doesn't exists.
func (*Registry) SecretWithUID ¶
SecretWithUID returns a registered secret with the given UID, or nil if doesn't exists.
func (*Registry) Secrets ¶
func (r *Registry) Secrets() []types.NamespacedName
Secrets returns all register secret's names.
func (*Registry) UnregisterOwnedSecret ¶
func (r *Registry) UnregisterOwnedSecret(name types.NamespacedName) error
UnregisterOwnedSecret removes an owned secret to the registry.
type SecretNameAlreadyExistsErr ¶
type SecretNameAlreadyExistsErr string
func (SecretNameAlreadyExistsErr) Error ¶
func (e SecretNameAlreadyExistsErr) Error() string
type SecretNotFoundErr ¶
type SecretNotFoundErr struct {
// contains filtered or unexported fields
}
func (SecretNotFoundErr) Error ¶
func (e SecretNotFoundErr) Error() string