From 979763b5ec524bf153cc490245315d0b05daa55e Mon Sep 17 00:00:00 2001 From: Mayuresh Nirhali Date: Wed, 17 Sep 2025 22:50:02 +0530 Subject: [PATCH] Issue 511 - Fix config names, config file indentation. --- config/local-dev.yaml | 32 ++++++++++++++++--- config/local-simple.yaml | 18 +++++------ .../implementation/registry/registry.go | 8 ++--- 3 files changed, 41 insertions(+), 17 deletions(-) diff --git a/config/local-dev.yaml b/config/local-dev.yaml index 0520f90..6c7377b 100644 --- a/config/local-dev.yaml +++ b/config/local-dev.yaml @@ -22,8 +22,14 @@ modules: handler: type: std role: bap - registryUrl: http://localhost:8080/reg plugins: + registry: + id: registry + config: + url: http://localhost:8080/reg + retry_max: "3" + retry_wait_min: "100ms" + retry_wait_max: "500ms" keyManager: id: keymanager config: @@ -59,8 +65,14 @@ modules: handler: type: std role: bap - registryUrl: http://localhost:8080/reg plugins: + registry: + id: registry + config: + url: http://localhost:8080/reg + retry_max: "3" + retry_wait_min: "100ms" + retry_wait_max: "500ms" keyManager: id: keymanager config: @@ -92,8 +104,14 @@ modules: handler: type: std role: bpp - registryUrl: http://localhost:8080/reg plugins: + registry: + id: registry + config: + url: http://localhost:8080/reg + retry_max: "3" + retry_wait_min: "100ms" + retry_wait_max: "500ms" keyManager: id: keymanager config: @@ -125,8 +143,14 @@ modules: handler: type: std role: bpp - registryUrl: http://localhost:8080/reg plugins: + registry: + id: registry + config: + url: http://localhost:8080/reg + retry_max: "3" + retry_wait_min: "100ms" + retry_wait_max: "500ms" keyManager: id: keymanager config: diff --git a/config/local-simple.yaml b/config/local-simple.yaml index 72ed267..af061a5 100644 --- a/config/local-simple.yaml +++ b/config/local-simple.yaml @@ -23,7 +23,7 @@ modules: type: std role: bap plugins: - registry: + registry: id: registry config: url: http://registry:3030/subscribers @@ -42,7 +42,7 @@ modules: cache: id: cache config: - addr: localhost:6379 + addr: redis:6379 schemaValidator: id: schemavalidator config: @@ -68,7 +68,7 @@ modules: type: std role: bap plugins: - registry: + registry: id: registry config: url: http://registry:3030/subscribers @@ -87,7 +87,7 @@ modules: cache: id: cache config: - addr: localhost:6379 + addr: redis:6379 router: id: router config: @@ -109,7 +109,7 @@ modules: type: std role: bpp plugins: - registry: + registry: id: registry config: url: http://registry:3030/subscribers @@ -128,7 +128,7 @@ modules: cache: id: cache config: - addr: localhost:6379 + addr: redis:6379 schemaValidator: id: schemavalidator config: @@ -148,7 +148,7 @@ modules: type: std role: bpp plugins: - registry: + registry: id: registry config: url: http://registry:3030/subscribers @@ -167,7 +167,7 @@ modules: cache: id: cache config: - addr: localhost:6379 + addr: redis:6379 router: id: router config: @@ -176,4 +176,4 @@ modules: id: signer steps: - addRoute - - sign \ No newline at end of file + - sign diff --git a/pkg/plugin/implementation/registry/registry.go b/pkg/plugin/implementation/registry/registry.go index a76d9ae..d915904 100644 --- a/pkg/plugin/implementation/registry/registry.go +++ b/pkg/plugin/implementation/registry/registry.go @@ -16,10 +16,10 @@ import ( // Config holds configuration parameters for the registry client. type Config struct { - URL string - RetryMax int - RetryWaitMin time.Duration - RetryWaitMax time.Duration + URL string `yaml:"url" json:"url"` + RetryMax int `yaml:"retry_max" json:"retry_max"` + RetryWaitMin time.Duration `yaml:"retry_wait_min" json:"retry_wait_min"` + RetryWaitMax time.Duration `yaml:"retry_wait_max" json:"retry_wait_max"` } // RegistryClient encapsulates the logic for calling the registry endpoints.