mirror of
https://github.com/qdm12/gluetun.git
synced 2026-06-21 03:14:10 +02:00
Maint: healthcheck package interface rework
- return concrete struct type - Add compilation checks for implementations
This commit is contained in:
@@ -5,9 +5,16 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/qdm12/gluetun/internal/constants"
|
||||
"github.com/qdm12/gluetun/internal/openvpn"
|
||||
)
|
||||
|
||||
func (s *server) onUnhealthyOpenvpn(ctx context.Context) {
|
||||
type openvpnHealth struct {
|
||||
looper openvpn.Looper
|
||||
healthyWait time.Duration
|
||||
healthyTimer *time.Timer
|
||||
}
|
||||
|
||||
func (s *Server) onUnhealthyOpenvpn(ctx context.Context) {
|
||||
s.logger.Info("program has been unhealthy for " +
|
||||
s.openvpn.healthyWait.String() + ": restarting OpenVPN")
|
||||
_, _ = s.openvpn.looper.ApplyStatus(ctx, constants.Stopped)
|
||||
|
||||
Reference in New Issue
Block a user