Skip to content

Commit

Permalink
stamp: move functions_inspector_port to the edge runtime section
Browse files Browse the repository at this point in the history
  • Loading branch information
nyannyacha committed May 24, 2024
1 parent 1395121 commit 029a0e8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion internal/functions/serve/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
}
Expand Down
14 changes: 7 additions & 7 deletions internal/utils/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,8 @@ type (
}

edgeRuntime struct {
Enabled bool `toml:"enabled"`
Enabled bool `toml:"enabled"`
InspectorPort uint16 `toml:"inspector_port"`
}

function struct {
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion internal/utils/templates/init_config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ skip_nonce_check = false

[edge_runtime]
enabled = true
inspector_port = 8083

[analytics]
enabled = false
Expand All @@ -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

0 comments on commit 029a0e8

Please sign in to comment.