MCPcopy
hub / github.com/SpiderClub/haipproxy / RobinStrategy

Class RobinStrategy

client/py_cli.py:30–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28
29
30class RobinStrategy(Strategy):
31 def __init__(self):
32 super().__init__()
33 self.strategy = 'robin'
34
35 def get_proxies_by_stragery(self, pool):
36 if not pool:
37 return None
38 proxy = pool[0]
39 pool[0], pool[-1] = pool[-1], pool[0]
40 return proxy
41
42
43class GreedyStrategy(Strategy):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected