Shutdown will close the cache which will trigger eviction of all the Bridge entries.
(_ context.Context)
| 247 | |
| 248 | // Shutdown will close the cache which will trigger eviction of all the Bridge entries. |
| 249 | func (p *CachedBridgePool) Shutdown(_ context.Context) error { |
| 250 | p.shutDownOnce.Do(func() { |
| 251 | // Prevent new requests from being served. |
| 252 | close(p.shuttingDownCh) |
| 253 | |
| 254 | p.cache.Close() |
| 255 | }) |
| 256 | |
| 257 | return nil |
| 258 | } |