Diarkis Server Template Directories
We will look at the directories of Diarkis Server Template.
Below is the directories of Diarkis Server Template:
Server Entries
Diarkis server is separated by network protocol. Here we have UDP, TCP, WS (WebSocket), and HTTP server main.go files under server.
These are the server entry points for each server.
MARS Server
Diarkis has its own unique server called MARS every Diarkis server cluster must have one MARS server. mars/main.go is the MARS server main code.
You do NOT need to edit this file at all. You simply build MARS server using diarkis-cli.
Health Check
When you deploy Diarkis server cluster on Kubernetes, it requires health check on every server pod. Diarkis Server Template provides the health check tool for this.
Similar to MARS server, you do NOT need to edit healthcheck/main.go, but simple build it with diarkis-cli.
Configurations
configs/ directory contains all configuration files for the servers.
Custom Commands
Diarkis server allows you to implement your own custom commands.
Commands are ways for the Diarkis client and server to communicate each other and execute operations RPC style.
There are two custom command directories:
cmds/ for UDP, TCP, and HTTP
ws_cmds/ for WebSocket.
Build.yml File
build.yml is used by diarkis-cli. For details on build.yml file, please read here.
Last updated