func main() { ch := make(chan os.Signal, 1) signal.Notify(ch, os.Interrupt) go func() { for sig := range ch { panic(sig) } }() //log.SetPrefix("[SumComputation log] ") log.Printf("SumComputation started") c := computations.NewTimeBucketsComputation(&SumProcessor{state: NewSumProcessorState()}) computations.StartPlugin(c) }
func main() { //log.SetPrefix("[fooComputation log] ") log.Printf("fooComputation started") c := &FooComputation{1} computations.StartPlugin(c) }
func main() { //log.SetPrefix("[alarmComputation log] ") log.Printf("alarmComputation started") c := &AlarmComputation{NewAlarmComputationState()} computations.StartPlugin(c) }
func main() { //log.SetPrefix("[barComputation log] ") log.Printf("barComputation started") c := BarComputation{} computations.StartPlugin(c) }