executeOnArbitraryNode routes command to an arbitrary node
(ctx context.Context, cmd Cmder)
| 71 | |
| 72 | // executeOnArbitraryNode routes command to an arbitrary node |
| 73 | func (c *ClusterClient) executeOnArbitraryNode(ctx context.Context, cmd Cmder) error { |
| 74 | node := c.pickArbitraryNode(ctx) |
| 75 | if node == nil { |
| 76 | return errClusterNoNodes |
| 77 | } |
| 78 | return node.Client.Process(ctx, cmd) |
| 79 | } |
| 80 | |
| 81 | // executeOnAllNodes executes command on all nodes (masters and replicas) |
| 82 | func (c *ClusterClient) executeOnAllNodes(ctx context.Context, cmd Cmder, policy *routing.CommandPolicy) error { |
no test coverage detected