MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / IsServerRunning

Function IsServerRunning

internal/cli/server.go:109–111  ·  view source on GitHub ↗

IsServerRunning checks if the server is currently running.

(cfg *config.Config)

Source from the content-addressed store, hash-verified

107
108// IsServerRunning checks if the server is currently running.
109func IsServerRunning(cfg *config.Config) bool {
110 return isServerHealthy(cfg.Host, cfg.Port)
111}
112
113func isServerHealthy(host string, port int) bool {
114 client := &http.Client{Timeout: 1 * time.Second}

Callers 2

collectLocalInfoFunction · 0.92
dbRestoreCmdFunction · 0.92

Calls 1

isServerHealthyFunction · 0.85

Tested by

no test coverage detected