Help us shape the future of Go! Take the 2026 Go Developer Survey

sn

package
v1.3.104 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Overview

Package sn pkg/services/sn/sn.go c2-vis-appsvc

setup-node as a pkg/services.Service. Listens on dmsg port 36 for route-setup RPC requests; optionally builds a transport manager for the cascade-route-setup path that reaches visors over STCPR.

Block shape supports either inline router.SetupConfig fields or a `config_path` indirection (the existing per-service JSON file). E2E uses the file path; tighter "all-in-one" deployments can embed the config inline.

Index

Constants

View Source
const Type = "setup-node"

Type is the registry key used in services.json blocks.

Variables

This section is empty.

Functions

func LoadFile

func LoadFile(path string) (*router.SetupConfig, error)

LoadFile reads a setup-node config file. Returns the inner SetupConfig directly because the file-based path doesn't carry the supervisor-only fields (MetricsAddr, PProfMode, etc.).

func New

func New(cfg *Config, log *logging.Logger) services.Service

New builds a Service from an already-parsed Config.

Types

type Config

type Config struct {
	router.SetupConfig

	// ConfigPath, when non-empty, is the path to a JSON file
	// containing a router.SetupConfig. Read at Run() time; values
	// from the file overwrite any inline equivalents. Mutually
	// exclusive in spirit (inline config is the alternative).
	ConfigPath string `json:"config_path,omitempty"`

	MetricsAddr string `json:"metrics_addr,omitempty"`
	PProfMode   string `json:"pprof_mode,omitempty"`
	PProfAddr   string `json:"pprof_addr,omitempty"`
	Tag         string `json:"tag,omitempty"`
}

Config is the JSON configuration for setup-node. Embeds router.SetupConfig so callers can either set those fields inline in the block (small all-in-one deployments) or point at a file via ConfigPath (production / CI e2e — the file wins when set).

func ParseBlock

func ParseBlock(raw []byte) (*Config, error)

ParseBlock decodes a services.json block into a Config.

Jump to

Keyboard shortcuts

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