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
31 lines
673 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"FRMS/internal/pkg/server"
|
|
)
|
|
|
|
type reactorListener interface {
|
|
Start()
|
|
GetIp() string
|
|
GetPort() int
|
|
}
|
|
|
|
func NewReactorListener(ch chan error) reactorListener {
|
|
return server.NewReactorListener(ch)
|
|
}
|
|
|
|
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 {
|
|
//fmt.Printf("ERROR: %v\n",err)
|
|
return
|
|
}
|
|
}
|