serverinfo

package
v0.45.1 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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