serverinfo

package
v0.32.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package serverinfo probes a running jentic-one server for liveness and version, used to decorate the help screen and install wizard with the server's version alongside the CLI's own.

Index

Constants

View Source
const DefaultTimeout = 400 * time.Millisecond

DefaultTimeout bounds the health probe so interactive surfaces (help screen, install wizard) never block noticeably when the server is down or slow.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	// Running reports whether GET {baseURL}/health returned 200.
	Running bool
	// Version is the server's reported version (empty if the server is down or
	// does not report one).
	Version string
}

Info is the result of probing the server's health endpoint.

func Probe

func Probe(baseURL string, timeout time.Duration) Info

Probe queries {baseURL}/health and reports whether the server is reachable and its version. It is best-effort: any error (down, timeout, bad payload) yields a zero Info with Running=false.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL