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

Function IsServerRunning

internal/cli/server.go:276–278  ·  view source on GitHub ↗

IsServerRunning reports whether a server answers on the configured address.

(cfg *config.Config)

Source from the content-addressed store, hash-verified

274
275// IsServerRunning reports whether a server answers on the configured address.
276func IsServerRunning(cfg *config.Config) bool {
277 return portHeld(cfg.Host, cfg.Port)
278}
279
280// Two questions, two probes (TASK-3620). The old single probe was an HTTP GET
281// of /health that required a 200, and it was wrong both ways:

Calls 1

portHeldFunction · 0.85