platform

package
v1.0.0-beta.57 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package platform holds the platform-identity struct used across the SemStreams codebase. It lives at pkg/ so leaf packages (message, vocabulary) can reference platform identity without dragging in the full config tree.

Historically PlatformConfig lived in package config. That created a transitive import cycle: any package that wanted to label messages with platform identity (e.g. message/federation.go) had to import config, which forced config to stay free of imports from packages like component — even though config legitimately needs to consume component port definitions for stream derivation. Promoting the struct to a leaf package breaks the cycle without spreading platform identity across multiple definitions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Org          string   `json:"org"`                    // Organization namespace (e.g., "c360", "noaa")
	ID           string   `json:"id"`                     // Platform identifier (e.g., "platform1")
	Type         string   `json:"type"`                   // vessel, shore, buoy, satellite
	Region       string   `json:"region,omitempty"`       // gulf_mexico, atlantic, pacific
	Capabilities []string `json:"capabilities,omitempty"` // radar, ctd, deployment, etc.

	// Federation support for multi-platform deployments
	InstanceID  string `json:"instance_id,omitempty"` // e.g., "west-1", "dev-local", "vessel-alpha"
	Environment string `json:"environment,omitempty"` // "prod", "dev", "test"
}

Config defines platform identity and capabilities.

Accessed as platform.Config to match the convention used by sibling leaf packages (pkg/security/config.go: security.Config). The config-package alias config.PlatformConfig is preserved for backward compatibility with existing call sites.

Six-part federated entity IDs are anchored on these fields (org.platform.domain.system.type.instance). The struct is JSON- shaped so it round-trips cleanly through config files and embedded message metadata.

Jump to

Keyboard shortcuts

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