(strategy: str, providers: List)
| 106 | |
| 107 | @staticmethod |
| 108 | def create(strategy: str, providers: List) -> Router: |
| 109 | strategies = { |
| 110 | 'round_robin': RoundRobinRouter, |
| 111 | 'weighted': WeightedRouter, |
| 112 | 'failover': FailoverRouter |
| 113 | } |
| 114 | |
| 115 | router_class = strategies.get(strategy, RoundRobinRouter) |
| 116 | return router_class(providers) |
no outgoing calls
no test coverage detected