SchedulingStrategy is the interface that wraps the basic SelectNode method.
| 31 | |
| 32 | // SchedulingStrategy is the interface that wraps the basic SelectNode method. |
| 33 | type SchedulingStrategy interface { |
| 34 | // SelectNode selects num node to schedule the key. |
| 35 | SelectNode(nodes []*NodeStatus, key []byte, num int) (*NodeStatus, error) |
| 36 | } |
| 37 | |
| 38 | // SetSchedulingStrategy sets the scheduling strategy. |
| 39 | func (s *Scheduler) SetSchedulingStrategy(strategy SchedulingStrategy) { |
nothing calls this directly
no outgoing calls
no test coverage detected