MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / ensureCursorKey

Method ensureCursorKey

sdk/cliproxy/auth/selector.go:287–291  ·  view source on GitHub ↗

ensureCursorKey ensures the cursor map has capacity for the given key. Must be called with s.mu held.

(key string, limit int)

Source from the content-addressed store, hash-verified

285// ensureCursorKey ensures the cursor map has capacity for the given key.
286// Must be called with s.mu held.
287func (s *RoundRobinSelector) ensureCursorKey(key string, limit int) {
288 if _, ok := s.cursors[key]; !ok && len(s.cursors) >= limit {
289 s.cursors = make(map[string]int)
290 }
291}
292
293// Pick selects the first available auth for the provider in a deterministic manner.
294func (s *FillFirstSelector) Pick(ctx context.Context, provider, model string, opts cliproxyexecutor.Options, auths []*Auth) (*Auth, error) {

Callers 1

PickMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected