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.

28 lines
515 B
Go

package main
import (
"fmt"
3 years ago
"FRMS/internal/pkg/reactor"
)
3 years ago
type coordinator interface {
Start() error
}
3 years ago
func NewCoordinator(s string,ch chan error) coordinator {
3 years ago
// allows interface checking as opposed to calling directly
3 years ago
return reactor.NewCoordinator(s,ch)
3 years ago
}
3 years ago
func main() {
3 years ago
ch := make(chan error)
rlc := NewCoordinator("192.1.168.136:2000",ch) // host port
3 years ago
go rlc.Start()
3 years ago
fmt.Printf("Starting reactor\n")
err := <-ch
if err != nil {
fmt.Println(err)
}
}