From d69634a706065dc50f9dd00f8d8cf94c82c09c16 Mon Sep 17 00:00:00 2001 From: postmannen Date: Fri, 1 Apr 2022 05:46:37 +0200 Subject: [PATCH] added helloRegister and centralAuth to server --- server.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/server.go b/server.go index 9ab6d7d..c279ea8 100644 --- a/server.go +++ b/server.go @@ -63,6 +63,11 @@ type server struct { // signatures holds all the signatures, // and the public keys signatures *signatures + // helloRegister is a register of all the nodes that have sent hello messages + // to the central server + helloRegister *helloRegister + // holds the logic for the central auth services + centralAuth *centralAuth } // newServer will prepare and return a server type @@ -157,6 +162,8 @@ func NewServer(configuration *Configuration, version string) (*server, error) { tui: tuiClient, errorKernel: errorKernel, signatures: signatures, + helloRegister: newHelloRegister(), + centralAuth: newCentralAuth(), } // Create the default data folder for where subscribers should @@ -178,6 +185,16 @@ func NewServer(configuration *Configuration, version string) (*server, error) { } +// helloRegister is a register of all the nodes that have sent hello messages. +type helloRegister struct { +} + +func newHelloRegister() *helloRegister { + h := helloRegister{} + + return &h +} + // create socket will create a socket file, and return the net.Listener to // communicate with that socket. func createSocket(socketFolder string, socketFileName string) (net.Listener, error) {