diff options
Diffstat (limited to 'internal/clients')
| -rw-r--r-- | internal/clients/handlers/withcancel.go | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/internal/clients/handlers/withcancel.go b/internal/clients/handlers/withcancel.go deleted file mode 100644 index 7c9cf4e..0000000 --- a/internal/clients/handlers/withcancel.go +++ /dev/null @@ -1,24 +0,0 @@ -package handlers - -import "context" - -type withCancel struct { - ctx context.Context - done chan struct{} -} - -// WithCancel sets and returns the context used. -func (w *withCancel) WithCancel(ctx context.Context) (context.Context, context.CancelFunc) { - cancelCtx, cancel := context.WithCancel(ctx) - w.ctx = cancelCtx - - return cancelCtx, cancel -} - -func (w *withCancel) Done() <-chan struct{} { - return w.done -} - -func (w *withCancel) shutdown() { - close(w.done) -} |
