mirror of
https://github.com/qdm12/gluetun.git
synced 2026-05-17 06:00:15 +02:00
Maint: loopstate package used in Openvpn state
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package loopstate
|
||||
|
||||
import "github.com/qdm12/gluetun/internal/models"
|
||||
|
||||
type Getter interface {
|
||||
GetStatus() (status models.LoopStatus)
|
||||
}
|
||||
|
||||
// GetStatus gets the status thread safely.
|
||||
func (s *State) GetStatus() (status models.LoopStatus) {
|
||||
s.statusMu.RLock()
|
||||
defer s.statusMu.RUnlock()
|
||||
return s.status
|
||||
}
|
||||
Reference in New Issue
Block a user