Maint: package local narrow Logger interfaces
This commit is contained in:
8
internal/dns/logger.go
Normal file
8
internal/dns/logger.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package dns
|
||||
|
||||
type Logger interface {
|
||||
Debug(s string)
|
||||
Info(s string)
|
||||
Warn(s string)
|
||||
Error(s string)
|
||||
}
|
||||
@@ -13,7 +13,6 @@ import (
|
||||
"github.com/qdm12/gluetun/internal/dns/state"
|
||||
"github.com/qdm12/gluetun/internal/loopstate"
|
||||
"github.com/qdm12/gluetun/internal/models"
|
||||
"github.com/qdm12/golibs/logging"
|
||||
)
|
||||
|
||||
var _ Looper = (*Loop)(nil)
|
||||
@@ -33,7 +32,7 @@ type Loop struct {
|
||||
resolvConf string
|
||||
blockBuilder blacklist.Builder
|
||||
client *http.Client
|
||||
logger logging.Logger
|
||||
logger Logger
|
||||
userTrigger bool
|
||||
start <-chan struct{}
|
||||
running chan<- models.LoopStatus
|
||||
@@ -48,7 +47,7 @@ type Loop struct {
|
||||
const defaultBackoffTime = 10 * time.Second
|
||||
|
||||
func NewLoop(conf unbound.Configurator, settings configuration.DNS, client *http.Client,
|
||||
logger logging.Logger) *Loop {
|
||||
logger Logger) *Loop {
|
||||
start := make(chan struct{})
|
||||
running := make(chan models.LoopStatus)
|
||||
stop := make(chan struct{})
|
||||
|
||||
Reference in New Issue
Block a user