Crate brinkhaustools

Source
Expand description

Brinkhaus Tools — reusable infrastructure components for Brinkhaus industrial applications.

This crate provides the core building blocks: shutdown handling, JSON settings, self-diagnosis, status collection, heartbeat monitoring, logging, and version information.

Enable the fleet feature for the FleetMonitorClient and StatusMonitor (adds reqwest + tokio), and the licence feature for offline-verifiable, hardware-bound licences (adds ring).

Modules§

  • Offline-verifiable, hardware-bound licences (feature licence).

Structs§

  • Central wiring object connecting all infrastructure components.
  • Builder for constructing an App instance.
  • A command the FleetManager can invoke on this software (mirrors the Python CommandSpec). The catalog of registered commands rides along with every status snapshot under commands.
  • Device identity sent with every heartbeat. All fields are optional and sent only when set. serial/display_name/inventory_no/stream and the password scheme are machine-wide (fleet config file); branding is software-specific. The server only accepts a serial that is registered or assigned.
  • A diagnostic message with a numeric code and optional auto-timeout.
  • Configuration for the FleetMonitorClient.
  • HTTPS client for the BrinkhausFleetManager ingest API.
  • Watchdog engine for detecting hung tasks.
  • Configuration for the LoggingHelper.
  • Centralized logging with rotating file handler and in-memory ring buffer.
  • One translatable piece of a diagnosis message: a text key and the values for its placeholders. The UI looks the key up in its own catalog and fills in the parameters; the plain message stays the fallback.
  • Thread-safe ring buffer that keeps the last N log lines.
  • Engine for tracking diagnostic messages with numeric codes, severity, and auto-timeout.
  • Thread-safe JSON settings with hierarchical key access and atomic persistence.
  • Coordinates graceful shutdown with signal handling and interruptible sleep.
  • Cheaply cloneable handle to a ShutdownHandler.
  • Periodic status collection from pluggable sources.
  • High-level bridge between SelfDiagnosisEngine and the FleetManager backend.
  • A self-describing status leaf (Grand Unified Log Strategy).
  • Loads version metadata from a JSON file.

Enums§

Traits§

Functions§

Type Aliases§

  • Result of a fleet command: (result, message), result one of "success", "failure", "rejected" (same contract as the Python CommandResult).
  • Convenience alias for std::result::Result<T, Error>.