loadProviders returns the current providers snapshot. The returned slice must not be mutated.
()
| 142 | // loadProviders returns the current providers snapshot. The returned |
| 143 | // slice must not be mutated. |
| 144 | func (p *CachedBridgePool) loadProviders() []aibridge.Provider { |
| 145 | if ptr := p.providers.Load(); ptr != nil { |
| 146 | return *ptr |
| 147 | } |
| 148 | return nil |
| 149 | } |
| 150 | |
| 151 | // Acquire retrieves or creates a [*aibridge.RequestBridge] instance per given key. |
| 152 | // |