ContextWithPollConfig returns a context with polling configuration. Use this in tests to reduce or disable polling.
(ctx context.Context, config PollConfig)
| 74 | // ContextWithPollConfig returns a context with polling configuration. |
| 75 | // Use this in tests to reduce or disable polling. |
| 76 | func ContextWithPollConfig(ctx context.Context, config PollConfig) context.Context { |
| 77 | return context.WithValue(ctx, pollConfigKey{}, config) |
| 78 | } |
| 79 | |
| 80 | // getPollConfig returns the polling configuration from context, or defaults. |
| 81 | func getPollConfig(ctx context.Context) PollConfig { |
no outgoing calls