ContextHandler delivers events to the Handler as long as ctx.Err() is non-nil.
(ctx context.Context, handler Handler)
| 72 | |
| 73 | // ContextHandler delivers events to the Handler as long as ctx.Err() is non-nil. |
| 74 | func ContextHandler(ctx context.Context, handler Handler) Handler { |
| 75 | return &contextHandler{Context: ctx, Handler: handler} |
| 76 | } |
| 77 | |
| 78 | type contextHandler struct { |
| 79 | context.Context |
no outgoing calls