chore(all): remove unexported interfaces
This commit is contained in:
@@ -1,21 +1,12 @@
|
||||
package httpproxy
|
||||
|
||||
type Logger interface {
|
||||
infoErrorer
|
||||
Debug(s string)
|
||||
infoer
|
||||
Warn(s string)
|
||||
errorer
|
||||
}
|
||||
|
||||
type infoErrorer interface {
|
||||
infoer
|
||||
errorer
|
||||
}
|
||||
|
||||
type infoer interface {
|
||||
Info(s string)
|
||||
}
|
||||
|
||||
type errorer interface {
|
||||
Error(s string)
|
||||
}
|
||||
|
||||
@@ -13,8 +13,8 @@ import (
|
||||
)
|
||||
|
||||
type Loop struct {
|
||||
statusManager statusManager
|
||||
state StateManager
|
||||
statusManager *loopstate.State
|
||||
state *state.State
|
||||
// Other objects
|
||||
logger Logger
|
||||
// Internal channels and locks
|
||||
@@ -25,18 +25,6 @@ type Loop struct {
|
||||
backoffTime time.Duration
|
||||
}
|
||||
|
||||
type statusManager interface {
|
||||
GetStatus() (status models.LoopStatus)
|
||||
SetStatus(status models.LoopStatus)
|
||||
ApplyStatus(ctx context.Context, status models.LoopStatus) (
|
||||
outcome string, err error)
|
||||
}
|
||||
|
||||
type StateManager interface {
|
||||
GetSettings() settings.HTTPProxy
|
||||
SetSettings(ctx context.Context, settings settings.HTTPProxy) (outcome string)
|
||||
}
|
||||
|
||||
const defaultBackoffTime = 10 * time.Second
|
||||
|
||||
func NewLoop(logger Logger, settings settings.HTTPProxy) *Loop {
|
||||
|
||||
Reference in New Issue
Block a user