chore(all): remove unexported interfaces
This commit is contained in:
@@ -32,11 +32,6 @@ type OpenVPN interface {
|
||||
WriteAuthFile(user, password string) error
|
||||
}
|
||||
|
||||
type StateManager interface {
|
||||
GetSettings() (vpn settings.VPN)
|
||||
SetSettings(ctx context.Context, vpn settings.VPN) (outcome string)
|
||||
}
|
||||
|
||||
type Providers interface {
|
||||
Get(providerName string) provider.Provider
|
||||
}
|
||||
@@ -73,16 +68,3 @@ type PublicIPLoop interface {
|
||||
outcome string, err error)
|
||||
SetData(data ipinfo.Response)
|
||||
}
|
||||
|
||||
type statusManager interface {
|
||||
GetStatus() (status models.LoopStatus)
|
||||
SetStatus(status models.LoopStatus)
|
||||
ApplyStatus(ctx context.Context, status models.LoopStatus) (
|
||||
outcome string, err error)
|
||||
Lock()
|
||||
Unlock()
|
||||
}
|
||||
|
||||
type runner interface {
|
||||
Run(ctx context.Context, waitError chan<- error, tunnelReady chan<- struct{})
|
||||
}
|
||||
|
||||
@@ -14,8 +14,8 @@ import (
|
||||
)
|
||||
|
||||
type Loop struct {
|
||||
statusManager statusManager
|
||||
state StateManager
|
||||
statusManager *loopstate.State
|
||||
state *state.State
|
||||
providers Providers
|
||||
storage Storage
|
||||
// Fixed parameters
|
||||
|
||||
@@ -23,7 +23,9 @@ func (l *Loop) Run(ctx context.Context, done chan<- struct{}) {
|
||||
providerConf := l.providers.Get(*settings.Provider.Name)
|
||||
|
||||
portForwarding := *settings.Provider.PortForwarding.Enabled
|
||||
var vpnRunner runner
|
||||
var vpnRunner interface {
|
||||
Run(ctx context.Context, waitError chan<- error, tunnelReady chan<- struct{})
|
||||
}
|
||||
var serverName, vpnInterface string
|
||||
var err error
|
||||
subLogger := l.logger.New(log.SetComponent(settings.Type))
|
||||
|
||||
Reference in New Issue
Block a user