GetConfig returns the Gateway Server config based on the context.
(ctx context.Context)
| 1402 | |
| 1403 | // GetConfig returns the Gateway Server config based on the context. |
| 1404 | func (gs *GatewayServer) GetConfig(ctx context.Context) (*Config, error) { |
| 1405 | if val, ok := ctx.Value(&ctxConfigKeyType{}).(*Config); ok { |
| 1406 | return val, nil |
| 1407 | } |
| 1408 | return gs.config, nil |
| 1409 | } |
| 1410 | |
| 1411 | // GetMQTTConfig returns the MQTT frontend configuration based on the context. |
| 1412 | func (gs *GatewayServer) GetMQTTConfig(ctx context.Context) (*config.MQTT, error) { |