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

Function WithFallbackID

pkg/frequencyplans/context.go:24–26  ·  view source on GitHub ↗

WithFallbackID returns a derived context with the given frequency plan ID to be used as fallback.

(ctx context.Context, id string)

Source from the content-addressed store, hash-verified

22
23// WithFallbackID returns a derived context with the given frequency plan ID to be used as fallback.
24func WithFallbackID(ctx context.Context, id string) context.Context {
25 return context.WithValue(ctx, fallbackKey, id)
26}
27
28// FallbackIDFromContext returns the fallback frequency plan ID and whether it's set using WithFallbackID.
29func FallbackIDFromContext(ctx context.Context) (string, bool) {

Callers 3

NewFunction · 0.92
handleTrafficMethod · 0.92
TestContextFunction · 0.92

Calls

no outgoing calls

Tested by 1

TestContextFunction · 0.74