mirror of
https://github.com/postmannen/ctrl.git
synced 2024-12-14 12:37:31 +00:00
added helloRegister and centralAuth to server
This commit is contained in:
parent
13fd48843d
commit
d69634a706
1 changed files with 17 additions and 0 deletions
17
server.go
17
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) {
|
||||
|
|
Loading…
Reference in a new issue