Skip to content

Commit

Permalink
feat(registry): add feature annotation client support
Browse files Browse the repository at this point in the history
Adding support for feature annotation client allows the application to interact with the feature annotation service, enabling new functionality.
  • Loading branch information
cybersiddhu committed Jan 30, 2025
1 parent ea3e7d8 commit ff0f5a7
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions internal/registry/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"io"

"github.com/dictyBase/arangomanager"
feature "github.com/dictyBase/go-genproto/dictybaseapis/feature_annotation"
"github.com/dictyBase/go-obograph/storage"
"github.com/jellydator/ttlcache/v3"
"github.com/minio/minio-go/v6"
Expand All @@ -14,20 +15,25 @@ import (
)

const (
LogrusKey = "logrus"
MinioKey = "minio"
LogFileKey = "log_file"
RedisKey = "redis"
ArangodbSessionKey = "arangodb_session"
Arangodb = "arangodb"
OboStorageKey = "obostorage"
OboReadersKey = "oboreaders"
TTLCacheKey = "ttlcache"
KubeClientKey = "kubeconfig"
LogrusKey = "logrus"
MinioKey = "minio"
LogFileKey = "log_file"
RedisKey = "redis"
ArangodbSessionKey = "arangodb_session"
Arangodb = "arangodb"
OboStorageKey = "obostorage"
OboReadersKey = "oboreaders"
TTLCacheKey = "ttlcache"
KubeClientKey = "kubeconfig"
FeatureAnnotationClientKey = "feature_annotation"
)

var v = viper.New()

func FeatureAnnotationAPIClient(cnt feature.FeatureAnnotationServiceClient) {
v.Set(FeatureAnnotationClientKey, cnt)
}

func SetValue(key, value string) {
v.Set(key, value)
}
Expand Down Expand Up @@ -135,3 +141,8 @@ func GetTTLCache() *ttlcache.Cache[string, string] {
ttlCache, _ := v.Get(TTLCacheKey).(*ttlcache.Cache[string, string])
return ttlCache
}

func GetFeatureAnnotationAPIClient() feature.FeatureAnnotationServiceClient {
cnt, _ := v.Get(FeatureAnnotationClientKey).(feature.FeatureAnnotationServiceClient)
return cnt
}

0 comments on commit ff0f5a7

Please sign in to comment.