Maint: firewall package interface rework

- return concrete struct type
- split interface is sub-interfaces
This commit is contained in:
Quentin McGaw (desktop)
2021-07-23 19:12:16 +00:00
parent 10aabe8375
commit 2ddc784965
9 changed files with 54 additions and 40 deletions

View File

@@ -7,7 +7,11 @@ import (
"github.com/qdm12/gluetun/internal/models"
)
func (c *configurator) SetVPNConnection(ctx context.Context, connection models.OpenVPNConnection) (err error) {
type VPNConnectionSetter interface {
SetVPNConnection(ctx context.Context, connection models.OpenVPNConnection) error
}
func (c *Config) SetVPNConnection(ctx context.Context, connection models.OpenVPNConnection) (err error) {
c.stateMutex.Lock()
defer c.stateMutex.Unlock()