executeOnAllShards executes command on all master shards
(ctx context.Context, cmd Cmder, policy *routing.CommandPolicy)
| 95 | |
| 96 | // executeOnAllShards executes command on all master shards |
| 97 | func (c *ClusterClient) executeOnAllShards(ctx context.Context, cmd Cmder, policy *routing.CommandPolicy) error { |
| 98 | state, err := c.state.Get(ctx) |
| 99 | if err != nil { |
| 100 | return err |
| 101 | } |
| 102 | |
| 103 | if len(state.Masters) == 0 { |
| 104 | return errClusterNoNodes |
| 105 | } |
| 106 | |
| 107 | return c.executeParallel(ctx, cmd, state.Masters, policy) |
| 108 | } |
| 109 | |
| 110 | // executeMultiShard handles commands that operate on multiple keys across shards |
| 111 | func (c *ClusterClient) executeMultiShard(ctx context.Context, cmd Cmder, policy *routing.CommandPolicy) error { |
no test coverage detected