mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 14:15:06 +03:00
Refactor multicast setup (isolated config, etc)
This commit is contained in:
parent
dad0b10dfe
commit
493208fb37
10 changed files with 215 additions and 150 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue