(ctx context.Context, errSignal chan error)
| 132 | } |
| 133 | |
| 134 | func (p *Proxy) Run(ctx context.Context, errSignal chan error) { |
| 135 | go func() { |
| 136 | select { |
| 137 | case <-ctx.Done(): |
| 138 | _ = p.server.Close() |
| 139 | } |
| 140 | }() |
| 141 | _ = p.server.ListenServeAndSignal(errSignal) |
| 142 | } |