WithContext returns a context with the specified timeout for the provided key
(ctx context.Context, key string)
| 51 | |
| 52 | // WithContext returns a context with the specified timeout for the provided key |
| 53 | func WithContext(ctx context.Context, key string) (context.Context, func()) { |
| 54 | t := Get(key) |
| 55 | return context.WithTimeout(ctx, t) |
| 56 | } |
| 57 | |
| 58 | // All returns all keys and their timeouts |
| 59 | func All() map[string]time.Duration { |
no test coverage detected
searching dependent graphs…