go-memcached
This project is a Go implementation of a memcached server.
The purpose of this project is to implement a simple go application that uses memcached, all within a dev container environment.
- Reliable deployment running in VSCode Dev Containers
- Support for GitHub Codespaces (TODO: browser connectivity)
- High performance caching
- Simple and easy to use API
To install and run this project locally, follow these steps:
- Copy the URL to the repo, but do not clone it:
https://github.com/your-username/go-memcached.git - Ensure Docker is installed and running on your machine
- Enable Remote Development extension in VSCode
- From the Command Palatte (CTRL/Command+Shift+P), type and select
Dev Containers: Clone Repository in Container Volume... - Choose Remote Source GitHub, and supply/choose the
go-memcachedrepo - Once all containers are built and running, use
go run .to start the app
Once the server is running, you can interact with it using a memcached client library or the telnet command.
Once the dev container is started, install telnet with sudo apt-get update && sudo apt-get install telnet.
Here's an example of how to set a key-value pair using telnet:
$ telnet localhost 11211
set mykey 0 3600 5
value
STORED
To retrieve the value:
$ telnet localhost 11211
get mykey
VALUE mykey 0 5
value
END
For more information on the available commands, refer to the memcached protocol documentation.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
This project is licensed under the MIT License.