hub

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 46 Imported by: 0

Documentation

Overview

Package hub handles updating systems and serving the web UI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Update

func Update(cmd *cobra.Command, _ []string)

Update updates beszel to the latest version

Types

type Hub

type Hub struct {
	core.App
	*alerts.AlertManager
	// contains filtered or unexported fields
}

Hub is the application. It embeds the PocketBase app and keeps references to subcomponents.

func NewHub

func NewHub(app core.App) *Hub

NewHub creates a new Hub instance with default configuration

func (*Hub) GetSSHKey

func (h *Hub) GetSSHKey(dataDir string) (ssh.Signer, error)

GetSSHKey generates key pair if it doesn't exist and returns signer

func (h *Hub) MakeLink(parts ...string) string

MakeLink formats a link with the app URL and path segments. Only path segments should be provided.

func (*Hub) SetFingerprint

func (h *Hub) SetFingerprint(fpRecord *ws.FingerprintRecord, fingerprint string) (err error)

SetFingerprint creates or updates a fingerprint record in the database.

func (*Hub) StartHub

func (h *Hub) StartHub() error

StartHub sets up event handlers and starts the PocketBase server

type PublicAppInfo added in v0.18.8

type PublicAppInfo struct {
	BASE_PATH           string
	HUB_VERSION         string
	HUB_URL             string
	OAUTH_DISABLE_POPUP bool `json:"OAUTH_DISABLE_POPUP,omitzero"`
}

PublicAppInfo defines the structure of the public app information that will be injected into the HTML

type UpdateInfo added in v0.18.5

type UpdateInfo struct {
	Version string `json:"v"`
	Url     string `json:"url"`
	// contains filtered or unexported fields
}

UpdateInfo holds information about the latest update check

Directories

Path Synopsis
Package config provides functions for syncing systems with the config.yml file
Package config provides functions for syncing systems with the config.yml file
Package expirymap provides a thread-safe map with expiring entries.
Package expirymap provides a thread-safe map with expiring entries.
Package heartbeat sends periodic outbound pings to an external monitoring endpoint (e.g.
Package heartbeat sends periodic outbound pings to an external monitoring endpoint (e.g.
Package transport provides a unified abstraction for hub-agent communication over different transports (WebSocket, SSH).
Package transport provides a unified abstraction for hub-agent communication over different transports (WebSocket, SSH).
Package utils provides utility functions for the hub.
Package utils provides utility functions for the hub.

Jump to

Keyboard shortcuts

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