From 029a0e842077061e570f2658156932dfacbf027f Mon Sep 17 00:00:00 2001 From: Nyannyacha Date: Fri, 24 May 2024 14:40:26 +0900 Subject: [PATCH] stamp: move `functions_inspector_port` to the edge runtime section --- internal/functions/serve/serve.go | 2 +- internal/utils/config.go | 14 +++++++------- internal/utils/templates/init_config.toml | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/internal/functions/serve/serve.go b/internal/functions/serve/serve.go index af0fdfcce..5a07a19e0 100644 --- a/internal/functions/serve/serve.go +++ b/internal/functions/serve/serve.go @@ -181,7 +181,7 @@ EOF portBindings := nat.PortMap{} if inspectorFlag != nil { portStr := fmt.Sprintf("%d/tcp", dockerInternalInspectorPort) - hostPort := strconv.FormatUint(uint64(utils.Config.Experimental.FunctionsInspectorPort), 10) + hostPort := strconv.FormatUint(uint64(utils.Config.EdgeRuntime.InspectorPort), 10) exposedPorts[nat.Port(portStr)] = struct{}{} portBindings[nat.Port(portStr)] = []nat.PortBinding{{HostPort: hostPort}} } diff --git a/internal/utils/config.go b/internal/utils/config.go index 4a03d204e..11519682f 100644 --- a/internal/utils/config.go +++ b/internal/utils/config.go @@ -435,7 +435,8 @@ type ( } edgeRuntime struct { - Enabled bool `toml:"enabled"` + Enabled bool `toml:"enabled"` + InspectorPort uint16 `toml:"inspector_port"` } function struct { @@ -455,12 +456,11 @@ type ( } experimental struct { - OrioleDBVersion string `toml:"orioledb_version"` - S3Host string `toml:"s3_host"` - S3Region string `toml:"s3_region"` - S3AccessKey string `toml:"s3_access_key"` - S3SecretKey string `toml:"s3_secret_key"` - FunctionsInspectorPort uint16 `toml:"functions_inspector_port"` + OrioleDBVersion string `toml:"orioledb_version"` + S3Host string `toml:"s3_host"` + S3Region string `toml:"s3_region"` + S3AccessKey string `toml:"s3_access_key"` + S3SecretKey string `toml:"s3_secret_key"` } // TODO diff --git a/internal/utils/templates/init_config.toml b/internal/utils/templates/init_config.toml index 02a52f789..b8be11227 100644 --- a/internal/utils/templates/init_config.toml +++ b/internal/utils/templates/init_config.toml @@ -152,6 +152,7 @@ skip_nonce_check = false [edge_runtime] enabled = true +inspector_port = 8083 [analytics] enabled = false @@ -172,4 +173,3 @@ s3_region = "env(S3_REGION)" s3_access_key = "env(S3_ACCESS_KEY)" # Configures AWS_SECRET_ACCESS_KEY for S3 bucket s3_secret_key = "env(S3_SECRET_KEY)" -functions_inspector_port = 8083