From 6e3b18fbde170adc90e90debca8d7e055c1a0a45 Mon Sep 17 00:00:00 2001 From: nirvanagit Date: Thu, 16 May 2024 18:11:20 -0700 Subject: [PATCH 1/2] add interface for getting configurations Signed-off-by: nirvanagit --- admiral/pkg/registry/registry.go | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 admiral/pkg/registry/registry.go diff --git a/admiral/pkg/registry/registry.go b/admiral/pkg/registry/registry.go new file mode 100644 index 00000000..85a87706 --- /dev/null +++ b/admiral/pkg/registry/registry.go @@ -0,0 +1,10 @@ +package registry + +// IdentityConfiguration is an interface to fetch configuration from a registry +// backend. The backend can provide an API to give configurations per identity, +// or if given a cluster name, it will provide the configurations for all +// the identities present in that cluster. +type IdentityConfiguration interface { + GetByIdentity(identityAlias string) error + GetByCluster(clusterName string) error +} From 24cb0b558b1f5cbfd3ab16e1e25e1131ca816ccd Mon Sep 17 00:00:00 2001 From: Anubhav Date: Fri, 17 May 2024 08:53:58 -0700 Subject: [PATCH 2/2] Update registry.go --- admiral/pkg/registry/registry.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admiral/pkg/registry/registry.go b/admiral/pkg/registry/registry.go index 85a87706..9d11bfb3 100644 --- a/admiral/pkg/registry/registry.go +++ b/admiral/pkg/registry/registry.go @@ -5,6 +5,6 @@ package registry // or if given a cluster name, it will provide the configurations for all // the identities present in that cluster. type IdentityConfiguration interface { - GetByIdentity(identityAlias string) error - GetByCluster(clusterName string) error + GetByIdentityByName(identityAlias string) error + GetByClusterName(clusterName string) error }