...

Package connector

import "github.com/Diarkis/diarkis/server/connector"
Overview
Index

Overview ▾

func Allocate

func Allocate() int

Allocate informs Diarkis server that client server no longer able to receive clients

func GetAddress

func GetAddress() string

GetAddress get the public endpoint address from Diarkis server for client server to use

func GetOpenPort

func GetOpenPort() (int, error)

GetOpenPort get an open port for client server to use from Diarkis server

func Health

func Health(ccu int) int

Health informs Diarkis server that client server is health

func Initialize

func Initialize() string

Initialize sets up find Diarkis server process endpoint

func Ready

func Ready() int

Ready informs Diarkis server that client server is ready to receive clients

func SendToDiarkis

func SendToDiarkis(endpoint string, mode string, value int) (int, []byte)

SendToDiarkis sends a communication message from client server to Diarkis server

func SetPublicEndPoint

func SetPublicEndPoint(addr string)

SetPublicEndPoint assigns a public endpoint for the connector

func Setup

func Setup(path string) int64

Setup [INTERNAL USE ONLY] is used to expose connector REST APIs for external server process to communicate with Diarkis process in order to use Diarkis' auto-scaling and other features

func Shutdown

func Shutdown() int

Shutdown informs Diarkis server that client server is shutting down This instructs Diarkis server to also shutdown