-
Notifications
You must be signed in to change notification settings - Fork 17
CLIENT COMMAND spec #5
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
Open
chayim
wants to merge
4
commits into
redis:master
Choose a base branch
from
chayim:ck-funcs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+76
−0
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# Redis Client Library Command Specification | ||
|
||
Redis client libraries provide helper functions for communicating with Redis. This specification exists to describe the format of the file used by redis clients, to communicate their function usage with Redis. | ||
|
||
## Implementation | ||
|
||
To implement this specification, a file named *usage.json* must be created at the root of the client repository. *usage.json* is a json formatted file containing links to generated documentation, and optionally examples. | ||
|
||
The following is the basic example of the *usage.json* specification. | ||
|
||
:: | ||
{ | ||
"name": "redis-py", | ||
"language": "python", | ||
"metadata": { | ||
"repository": "https://github.com/redis/redis-py", | ||
"issues_url": "https://github.com/redis/redis-py/issues" | ||
}, | ||
"commands": { | ||
"SET": { | ||
"uri": "https://redis.readthedocs.io/en/latest/commands.html#redis.commands.core.CoreCommands.set", | ||
"examples": [ | ||
{ | ||
"name": "Redis Set Example", | ||
"description": "The following is an example of setting a key in redis.", | ||
"example": "import redis\nr=redis.Redis()\nr.set('foo', 'bar')", | ||
"explanation": "In our example, a key named foo, is set to the value bar." | ||
} | ||
], | ||
"added": "2.0", | ||
"history": [ | ||
{ | ||
"version": "4.0.0", | ||
"note": "Added support for exat expiration flag", | ||
"releasenotes": "https://github.com/redis/redis-py/releases/tag/v4.0.0" | ||
} | ||
] | ||
}, | ||
"GET": { | ||
"uri": "https://redis.readthedocs.io/en/latest/commands.html#redis.commands.core.CoreCommands.get", | ||
"example": [ | ||
{ | ||
"name": "Get Example", | ||
"description": "The following is an example of retrieving a key named foo, already set in redis.", | ||
"example": "import redis\nr = redis.Redis()r.get('foo')" | ||
} | ||
], | ||
"added": "2.0" | ||
} | ||
} | ||
} | ||
|
||
## Field Descriptions | ||
|
||
* name - This is the name of client library | ||
* language - The language of the client library | ||
|
||
* metadata - A list of urls comprising of: | ||
* repository - A link to the source code for the Redis client library | ||
* issues_url - A link to open tickets for the client library | ||
|
||
* commands - A map of commands, keyed to the redis command name, with links to their respective documentation. | ||
chayim marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
* uri - The link to the documentation for the associated redis command | ||
* examples *(Optional)* - A list of dictionaries, each comprising of an example of the function usage. Each dictionary contains the following elements: | ||
* name - A name describing what the example does | ||
* description - A brief description of the example | ||
* example - A plain text entry containing the example. Newlines | ||
* explanation *(Optional)* - Text describing in depth, what the example does. | ||
|
||
* added *(Optional)* - The version of the client library containing this function | ||
* history *(Optional)* - A list of dictionaries containing change history. Each dictionary contains the following elements: | ||
* version - The client version containing this change | ||
* note - A plain text description of the change | ||
* release notes *(Optional)* - A link to release notes for specified client version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Redis Data Format Specifications |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that we have more than one connection - IMHO we should have a list of URIs. This would solve the Java use case. WDYT @sazzad16 @leibale
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chayim Agree. Multiple URIs makes more sense.