You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
673 B
Go

package main
3 years ago
import (
"fmt"
3 years ago
"FRMS/internal/pkg/server"
3 years ago
)
3 years ago
type reactorListener interface {
Start()
GetIp() string
GetPort() int
}
3 years ago
func NewReactorListener(ch chan error) reactorListener {
return server.NewReactorListener(ch)
}
3 years ago
func main() {
// lets get this bread
// all we need to do is call the reactor coordinator and thats it
ch := make(chan error)
rl := NewReactorListener(ch)
fmt.Printf("Starting Listener on %v:%v\n",rl.GetIp(),rl.GetPort())
go rl.Start()
err := <-ch // blocking to wait for any errors and keep alive otherwise
if err != nil {
3 years ago
//fmt.Printf("ERROR: %v\n",err)
return
}
}