Maint: loopstate package used in Openvpn state
This commit is contained in:
28
internal/httpproxy/state/state.go
Normal file
28
internal/httpproxy/state/state.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package state
|
||||
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/qdm12/gluetun/internal/configuration"
|
||||
"github.com/qdm12/gluetun/internal/loopstate"
|
||||
)
|
||||
|
||||
var _ Manager = (*State)(nil)
|
||||
|
||||
type Manager interface {
|
||||
SettingsGetterSetter
|
||||
}
|
||||
|
||||
func New(statusApplier loopstate.Applier,
|
||||
settings configuration.HTTPProxy) *State {
|
||||
return &State{
|
||||
statusApplier: statusApplier,
|
||||
settings: settings,
|
||||
}
|
||||
}
|
||||
|
||||
type State struct {
|
||||
statusApplier loopstate.Applier
|
||||
settings configuration.HTTPProxy
|
||||
settingsMu sync.RWMutex
|
||||
}
|
||||
Reference in New Issue
Block a user