Documentation
¶
Overview ¶
Package tpd pkg/services/tpd/config.go c2-vis-appsvc
JSON schema for transport-discovery as both a standalone config file (cmd/svc/transport-discovery -c path) AND a service block in services.json (skywire svc run --config services.json).
Package tpd pkg/services/tpd/tpd.go c2-vis-appsvc
transport-discovery as a pkg/services.Service. The standalone `skywire svc tpd` cobra command and the multi-service supervisor (`skywire svc run`) both end up calling Run(ctx) — the per-flag CLI path lives in cmd/svc/transport-discovery and constructs the Config from flags + optional --config file before handing off.
Index ¶
Constants ¶
const Type = "transport-discovery"
Type is the registry key used in services.json blocks.
Variables ¶
var ( DefaultEntryTimeout = 5 * time.Minute DefaultStoreDataPath = "/var/lib/skywire/tpd/bandwidth" DefaultUptimeDB = "/var/lib/skywire/tpd/uptime.db" DefaultRedisPoolSize = 10 )
Default values for the cobra command's flag defaults that get overridden by Config field zero-values. Exposed so the cmd package can reference one source of truth.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Path string `json:"-"`
services.Common
Whitelist []string `json:"whitelist_keys,omitempty"`
// StoreDataPath is the on-disk path for bandwidth backup files.
StoreDataPath string `json:"store_data_path,omitempty"`
// UptimeDB is the local self-uptime bbolt store path. Empty
// disables service-self uptime recording.
UptimeDB string `json:"uptime_db,omitempty"`
// ChartsAddr serves only the charts page over plain HTTP. Empty disables it.
ChartsAddr string `json:"charts_addr,omitempty"`
// Dmsg is the dmsg-related config block — same shape across
// every deployment service that uses it.
Dmsg cmdutil.DmsgConfig `json:"dmsg,omitempty"`
}
Config is the JSON configuration for transport-discovery.
func LoadFile ¶
LoadFile reads and strict-parses a Config from path. Used by the standalone cobra command (--config).
func ParseBlock ¶
ParseBlock decodes a services.json block (tolerant of unknown fields — the supervisor's framing keys "type"/"name" arrive in the same object).