# README
Kubecord Websock Handler
This is the websocket component of Kubecord. It is responsible for capturing events from the Discord websocket, forwarding them to NATS queues, and keeping the Redis cache consistent. Borrowed heavily from discordgo by bwmarrin.
Building
Binary
Checkout the code
git clone https://github.com/kubecord/websocket
Ensure you have go module support enabled
export GO111MODULE=on;
Build the binary
go build -o kubecord-ws
Docker
Checkout the code
git clone https://github.com/kubecord/websocket
Build the container
docker build -t kubecord-ws .
Binaries
Binaries will be provided once this project is at a point where we are confident that it meets most of our desired functionality. We will distribute them as releases on this repo, and as Docker containers available on Docker Hub.
Running
To run the websocket handler, you must set three required environment variables:
TOKEN
- Your bots tokenREDIS_ADDR
- The address to your redis server or clusterNATS_ADDR
- The address to your NATS server or cluster
Examples
Binary
export TOKEN=mytokenhere
export REDIS_ADDR=localhost:6379
export NATS_ADDR=localhost
./kubecord-ws
Docker
docker run -e "TOKEN=mytokenhere" -e "REDIS_ADDR=localhost:6379" -e "NATS_ADDR=localhost" -d kubecord-ws
Contributing
To contribute, please join our Discord server, you can find a link on the meta repo
# Constants
No description provided by the author
No description provided by the author
Valid GameType values.
Valid GameType values.
Valid GameType values.
Valid GameType values.
Websocket OpCodes.
Websocket OpCodes.
Websocket OpCodes.
Websocket OpCodes.
Websocket OpCodes.
Websocket OpCodes.
Websocket OpCodes.
Websocket OpCodes.
Websocket OpCodes.
Websocket OpCodes.
Websocket OpCodes.
# Variables
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
A Game struct holds the name of the "playing .." game for a user.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author