Maint: better openvpn loop interface composition

This commit is contained in:
Quentin McGaw (laptop)
2021-07-24 18:56:42 +00:00
parent 849dfee200
commit 8153d4bb2a
6 changed files with 32 additions and 14 deletions

View File

@@ -1,10 +1,14 @@
package state
type PortForwardedGetterSetter interface {
GetPortForwarded() (port uint16)
PortForwardedGetter
SetPortForwarded(port uint16)
}
type PortForwardedGetter interface {
GetPortForwarded() (port uint16)
}
// GetPortForwarded is used by the control HTTP server
// to obtain the port currently forwarded.
func (s *State) GetPortForwarded() (port uint16) {