(ctx context.Context, errSignal chan error)
| 137 | } |
| 138 | |
| 139 | func (p *Proxy) Run(ctx context.Context, errSignal chan error) { |
| 140 | go func() { |
| 141 | select { |
| 142 | case <-ctx.Done(): |
| 143 | _ = p.server.Close() |
| 144 | } |
| 145 | }() |
| 146 | _ = p.server.ListenServeAndSignal(errSignal) |
| 147 | } |