(state lifecycleState)
| 92 | } |
| 93 | |
| 94 | func lifecycleReadinessError(state lifecycleState) error { |
| 95 | switch state { |
| 96 | case lifecycleRunning: |
| 97 | return nil |
| 98 | default: |
| 99 | return errWireGuardNotStarted |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | func (wg *WireGuard) ensureRunningWithManagerLocked() error { |
| 104 | if err := lifecycleReadinessError(wg.state); err != nil { |
no outgoing calls
no test coverage detected