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

Function IsServerRunning

internal/cli/server.go:252–254  ·  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

250
251// IsServerRunning reports whether a server answers on the configured address.
252func IsServerRunning(cfg *config.Config) bool {
253 return portHeld(cfg.Host, cfg.Port)
254}
255
256// Two questions, two probes (TASK-3620). The old single probe was an HTTP GET
257// of /health that required a 200, and it was wrong both ways:

Calls 1

portHeldFunction · 0.85