Maint: openvpn loop is a concrete struct

This commit is contained in:
Quentin McGaw (laptop)
2021-07-24 19:14:49 +00:00
parent 8153d4bb2a
commit c8ad9b942a
10 changed files with 20 additions and 20 deletions

View File

@@ -25,7 +25,7 @@ type Looper interface {
PortForwader
}
type looper struct {
type Loop struct {
statusManager loopstate.Manager
state state.Manager
// Fixed parameters
@@ -56,11 +56,11 @@ const (
defaultBackoffTime = 15 * time.Second
)
func NewLooper(settings configuration.OpenVPN,
func NewLoop(settings configuration.OpenVPN,
username string, puid, pgid int, allServers models.AllServers,
conf Configurator, fw firewall.Configurator, routing routing.Routing,
logger logging.ParentLogger, client *http.Client,
tunnelReady chan<- struct{}) Looper {
tunnelReady chan<- struct{}) *Loop {
start := make(chan struct{})
running := make(chan models.LoopStatus)
stop := make(chan struct{})
@@ -69,7 +69,7 @@ func NewLooper(settings configuration.OpenVPN,
statusManager := loopstate.New(constants.Stopped, start, running, stop, stopped)
state := state.New(statusManager, settings, allServers)
return &looper{
return &Loop{
statusManager: statusManager,
state: state,
username: username,