Skip to content

Add the event doc #1745

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

Closed
wants to merge 2 commits into from
Closed

Add the event doc #1745

wants to merge 2 commits into from

Conversation

AnnAngela
Copy link
Contributor

@AnnAngela AnnAngela commented Nov 29, 2021

Description

Add the event doc


Checklist

  • Does npm test pass with this change (including linting)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?

The PR only changes a doc.

Please help me to improve the writing, my English is so bad :(

Please help me to improve the writing, my English is so bad :(
@leibale leibale requested review from guyroyse and simonprickett and removed request for simonprickett November 29, 2021 17:10
@guyroyse
Copy link
Contributor

Thanks for the contribution, @AnnAngela. Very helpful. I'd like to edit it a bit for grammar and spelling. Can you grant me access to do so? Thanks!

@AnnAngela
Copy link
Contributor Author

AnnAngela commented Nov 30, 2021 via email


Node Redis client class extends Node.js's `EventEmitter` class, and the client emits an event each time the network status changes:

| Event name | Scenes | Parameters |
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we clean up the table format here to be a bit tidier?

Copy link
Contributor

Choose a reason for hiding this comment

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

I like to use this site: http://markdowntable.com/

| error | When a network error has occurred, such as unable to connect to the server or the connection closed unexpectedly | The error object, such as `SocketClosedUnexpectedlyError: Socket closed unexpectedly` or `Error: connect ECONNREFUSED [IP]:[PORT]` |
| reconnecting | The client is trying to reconnect to the server. | _undefined_

Except for the network, the client will not emmit any events any more.
Copy link
Contributor

Choose a reason for hiding this comment

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

The client will not emit any other events beyond those listed abovee.

Copy link
Contributor

Choose a reason for hiding this comment

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

Doh! I spelled above wrong. ;)

@AnnAngela AnnAngela mentioned this pull request Dec 2, 2021
3 tasks
@AnnAngela
Copy link
Contributor Author

@guyroyse I'm sorry that I deleted the patch repository accidentally, so I have to open another pr #1753 to continue.

@AnnAngela AnnAngela closed this Dec 2, 2021
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