executeDefault handles standard command routing based on keys
(ctx context.Context, cmd Cmder, policy *routing.CommandPolicy, node *clusterNode)
| 60 | |
| 61 | // executeDefault handles standard command routing based on keys |
| 62 | func (c *ClusterClient) executeDefault(ctx context.Context, cmd Cmder, policy *routing.CommandPolicy, node *clusterNode) error { |
| 63 | if policy != nil && !c.hasKeys(cmd) { |
| 64 | if c.readOnlyEnabled() && policy.IsReadOnly() { |
| 65 | return c.executeOnArbitraryNode(ctx, cmd) |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | return node.Client.Process(ctx, cmd) |
| 70 | } |
| 71 | |
| 72 | // executeOnArbitraryNode routes command to an arbitrary node |
| 73 | func (c *ClusterClient) executeOnArbitraryNode(ctx context.Context, cmd Cmder) error { |
no test coverage detected