Walker creates a new Walker that follows a primary-with-fallback strategy, starting from the first key in the pool. The walker is not safe for concurrent use. It is intended for a single request's failover loop.
()
| 255 | // is not safe for concurrent use. It is intended for a single |
| 256 | // request's failover loop. |
| 257 | func (p *Pool) Walker() *Walker { |
| 258 | return &Walker{pool: p, pos: 0} |
| 259 | } |
| 260 | |
| 261 | // Next returns a Key handle for the next available key without |
| 262 | // modifying the pool state. |
no outgoing calls