peerstatus

package
v0.14.7-dev Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package peerstatus is a thin client for cloudbox's GET /api/v1/peers — the peer status board. It returns, for each paired host the caller can see (its owned hosts + hosts shared with it), online status, a same-LAN/remote location hint, and the build/OS/arch details the host last reported. Consumed by `outpost peers status` (CLI) and the `outpost_peers_status` MCP tool.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Peer

type Peer struct {
	Host       string `json:"host"`
	Alias      string `json:"alias,omitempty"`
	Owned      bool   `json:"owned"`
	Shared     bool   `json:"shared,omitempty"`
	Online     bool   `json:"online"`
	Location   string `json:"location"` // "same_lan" | "remote" | "unknown"
	Version    string `json:"version,omitempty"`
	Commit     string `json:"commit,omitempty"`
	OS         string `json:"os,omitempty"`
	Arch       string `json:"arch,omitempty"`
	OSVersion  string `json:"os_version,omitempty"`
	UpdateMode string `json:"update_mode,omitempty"`
}

Peer mirrors one row of cloudbox's /api/v1/peers response. Field tags match the cloudbox handler's V1PeerEntry exactly.

func Fetch

func Fetch(ctx context.Context, base, token string, client *http.Client) ([]Peer, error)

Fetch GETs the peer status board from cloudbox. base is the cloudbox origin (scheme+host); token is the per-outpost access_token. A nil client uses http.DefaultClient.

Jump to

Keyboard shortcuts

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