virtualdevicepool

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package virtualdevicepool implements the virtual_device_pool block (issue #84): it publishes pipeline messages as registered virtual devices through the engine ingest path — storage rows without MQTT.

Index

Constants

View Source
const Type = "virtual_device_pool"

Type is the block_type string stored in pipeline definitions.

Variables

This section is empty.

Functions

func Constructor

func Constructor(name string, config map[string]any, deps flow.Deps) (flow.Block, error)

Constructor builds a virtual_device_pool sink (issue #84). Each message's key addresses the target as <device_id>/<interface></path…> — upstream's key carries a realm segment first; astrate drops it because flows are per-realm. The payload is JSON-encoded and landed through deps.Ingest, the engine's device-owned ingest.

Config keys:

  • devices (string array): registered device_ids this pool may publish as. Required unless auto_register is true, in which case it may be omitted or empty and any entries present pre-seed the pool.
  • auto_register (optional bool): when true a message addressed to an unknown device id registers that id through deps.Register on first sight (requires the pairing register dependency) and is published as usual. The minted secret is discarded — astrate keeps credentials server-side. An id that turns out to be already registered and confirmed drops the message and is never cached, so every later message re-attempts registration (upstream parity).

Messages with an unusable key, a device outside the pool (with auto_register off), or an unmarshalable payload are logged and dropped — never an error. Ingest failures — and with auto_register on, register failures other than already-registered — are infrastructure problems and are returned wrapped.

Types

This section is empty.

Jump to

Keyboard shortcuts

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