Refactor multicast setup (isolated config, etc)

This commit is contained in:
Neil Alexander 2022-09-03 11:42:05 +01:00
parent dad0b10dfe
commit 493208fb37
10 changed files with 215 additions and 150 deletions

View file

@ -8,6 +8,20 @@ import (
"time"
)
// Any logger that satisfies this interface is suitable for Yggdrasil.
type Logger interface {
Printf(string, ...interface{})
Println(...interface{})
Infof(string, ...interface{})
Infoln(...interface{})
Warnf(string, ...interface{})
Warnln(...interface{})
Errorf(string, ...interface{})
Errorln(...interface{})
Debugf(string, ...interface{})
Debugln(...interface{})
}
// TimerStop stops a timer and makes sure the channel is drained, returns true if the timer was stopped before firing.
func TimerStop(t *time.Timer) bool {
stopped := t.Stop()