WithFallbackID returns a derived context with the given frequency plan ID to be used as fallback.
(ctx context.Context, id string)
| 22 | |
| 23 | // WithFallbackID returns a derived context with the given frequency plan ID to be used as fallback. |
| 24 | func 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. |
| 29 | func FallbackIDFromContext(ctx context.Context) (string, bool) { |
no outgoing calls