MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / GetConfig

Method GetConfig

pkg/gatewayserver/gatewayserver.go:1404–1409  ·  view source on GitHub ↗

GetConfig returns the Gateway Server config based on the context.

(ctx context.Context)

Source from the content-addressed store, hash-verified

1402
1403// GetConfig returns the Gateway Server config based on the context.
1404func (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.
1412func (gs *GatewayServer) GetMQTTConfig(ctx context.Context) (*config.MQTT, error) {

Callers 4

RegisterServicesMethod · 0.95
GetMQTTConfigMethod · 0.95
TestBatchGetStatusFunction · 0.45
TestFrontendFunction · 0.45

Calls 1

ValueMethod · 0.45

Tested by 2

TestBatchGetStatusFunction · 0.36
TestFrontendFunction · 0.36