websocket

command module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2019 License: MIT Imports: 21 Imported by: 0

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.

GitHub GitHub tag (latest SemVer)

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 token
  • REDIS_ADDR - The address to your redis server or cluster
  • NATS_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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL