Switched to redis/postgres, major refactoring

- loginMetadata is passed to shards through redis now
- shards announce they're alive via redis.AnnounceShard() which just
  populates a hashset keyed 'shards'
- login servers grab the 'shards' hashset and randomly picks a shard to
  pass the player to (for now)
- ./service shard && ./service login
- Many new environment variables, check config/config.go for more info.
  or for a tl;dr just read the Dockerfile for the required ones
- Shard and login services now run in different processes ! (and
  containers?? wooaaah)
This commit is contained in:
2023-06-22 01:53:38 -05:00
parent 983588b6c9
commit d7445e0f0f
20 changed files with 489 additions and 192 deletions

View File

@@ -1,5 +1,5 @@
#!/bin/sh
mkdir -p bin
CGO_ENABLED=0 GOOS=linux go build -o ./bin/server
CGO_ENABLED=0 GOOS=linux go build -o ./bin/server ./cmd
echo 'Done'