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

Method configFromContext

pkg/oauth/server.go:110–115  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

108var ctxKey ctxKeyType
109
110func (s *server) configFromContext(ctx context.Context) *Config {
111 if config, ok := ctx.Value(ctxKey).(*Config); ok {
112 return config
113 }
114 return &s.config
115}
116
117func (s *server) now() time.Time { return time.Now().UTC() }
118

Callers 1

RegisterRoutesMethod · 0.95

Calls 1

ValueMethod · 0.45

Tested by

no test coverage detected