First test

This commit is contained in:
Héctor Hurtado
2019-10-07 16:00:14 +02:00
parent bbda43b193
commit 9266f48c7e
2 changed files with 51 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
package control
import (
"fmt"
"net/http"
)
type ControlServer struct {
bindAddr string
mux *http.ServeMux
traceChannel chan string
certfile string
keyfile string
}
var server *ControlServer
func NewControlServer(bindAddr string, listenPort int, certfile, keyfile string) *ControlServer {
if server == nil {
server = &ControlServer{bindAddr: fmt.Sprintf("%s:%d", bindAddr, listenPort),
certfile: certfile,
keyfile: keyfile}
}
return server
}
func (*ControlServer) Start(traceChannel chan string) {
}