Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added clientId command in node #438

Merged
merged 2 commits into from
Oct 4, 2023
Merged

added clientId command in node #438

merged 2 commits into from
Oct 4, 2023

Conversation

adanWattad
Copy link
Contributor

added clientId command in node.

* case the client will initially try to route the command to the nodes defined by `route`.
* @returns the id of the client.
*/
public clientId(route?: Routes): Promise<number | [string, number][]> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rebase and use ClusterResponse<number>

@@ -175,4 +176,18 @@ export class RedisClusterClient extends BaseClient {
toProtobufRoute(route)
);
}

/** Returns the current connection id.
Copy link
Contributor

@shachlanAmazon shachlanAmazon Sep 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should the documentation explain that since connections might disconnect and reconnect, and since the command might be routed differently between calls, the result isn't promised to remain constant?
@barshaul

@adanWattad adanWattad force-pushed the node/clientId branch 3 times, most recently from ce1d98c to c0ea4c0 Compare September 20, 2023 08:22
@shachlanAmazon
Copy link
Contributor

please rebase

@adanWattad adanWattad force-pushed the node/clientId branch 4 times, most recently from b7e58bf to 6ddf1a0 Compare October 1, 2023 16:33
* @param route - The command will be routed automatically, unless `route` is provided, in which
* case the client will initially try to route the command to the nodes defined by `route`.
* @returns the id of the client. When specifying a route other than a single node,
* the response will be a dictionary of Address: nodeResponse.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a dictionary of Address: nodeResponse is neither english, nor types.

@adanWattad adanWattad merged commit 8f77396 into main Oct 4, 2023
4 checks passed
@adanWattad adanWattad deleted the node/clientId branch October 4, 2023 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants