Skip to content

Commit c1c8a89

Browse files
committed
Minor tweaks to config + transport loading if disabled
1 parent fe77cc3 commit c1c8a89

2 files changed

Lines changed: 20 additions & 4 deletions

File tree

config.yaml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ networking:
7070
# ======================================================================================
7171
transports:
7272
- type: dummy
73-
enabled: true
73+
enabled: false
7474
config:
7575
ipv4: 127.0.0.1
7676
port: 4434
7777

7878
- type: quic
79-
enabled: true
79+
enabled: false
8080
config:
8181
ipv4: 127.0.0.1
8282
port: 4433
@@ -86,7 +86,7 @@ transports:
8686
cert: ./data/certs/cert.pem
8787

8888
- type: uds
89-
enabled: true
89+
enabled: false
9090
config:
9191
socket: "/tmp/fdb.sock"
9292

@@ -101,7 +101,7 @@ transports:
101101
cert: ./data/certs/cert.pem
102102

103103
- type: udp
104-
enabled: true
104+
enabled: false
105105
config:
106106
ipv4: 127.0.0.1
107107
port: 5022
@@ -121,6 +121,14 @@ rpc:
121121
ipv4: 0.0.0.0
122122
port: 8845
123123

124+
# ======================================================================================
125+
# OBSERVABILITY CONFIGURATION (Metrics and Tracing)
126+
# ======================================================================================
127+
pprof:
128+
- name: fdb
129+
enabled: true
130+
endpoint: "0.0.0.0:6060"
131+
124132
# ======================================================================================
125133
# OBSERVABILITY CONFIGURATION (Metrics and Tracing)
126134
# ======================================================================================

fdb.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ func New(ctx context.Context, cfg config.Config) (*FDB, error) {
134134
}
135135

136136
for _, transport := range cfg.Transports {
137+
if !transport.Enabled {
138+
continue
139+
}
140+
137141
transportFn, tnOk := tRegistry[transport.Config.GetTransportType()]
138142
if !tnOk {
139143
return nil, fmt.Errorf("unknown transport type provided: %v - rejecting serving transports", transport)
@@ -198,6 +202,10 @@ func NewWithArgs(
198202
}
199203

200204
for _, transport := range cfg.Transports {
205+
if !transport.Enabled {
206+
continue
207+
}
208+
201209
transportFn, tnOk := tRegistry[transport.Config.GetTransportType()]
202210
if !tnOk {
203211
return nil, fmt.Errorf("unknown transport type provided: %v - rejecting serving transports", transport)

0 commit comments

Comments
 (0)