| Crates.io | samus |
| lib.rs | samus |
| version | 0.1.1 |
| created_at | 2025-01-04 19:43:43.420008+00 |
| updated_at | 2025-01-04 19:55:15.5534+00 |
| description | Volatile memory-store behind a socket server that implements simple CRUD queries |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1504194 |
| size | 9,533 |
A simple Redis-like volatile memory store behind a socket server.
Currently, the Samus socket server responds to the following command syntax:
For getting a key:
GET <key_name>
For setting a key:
SET <key_name> <key_value> <key_ttl>
Note: key values are represented internally as strings. Note: key ttl is given as whole seconds, and is not currently implemented (it will do nothing).
For deleting a key:
DELETE <key_name>
Be sure to add a newline character (\n) at the end of your queryies.
You can send as many queries as you want as one message (connection) to the socket as a newline seperated list. Make sure to include a trailing newline at the end of the list.
The server will respond with a response to your query. Look for the string __TERM__ in your message. When it appears, the socket server has closed its connection to your client. You will need a new connection to send a new query.