Documentation
¶
Overview ¶
Package types contains shared domain types used across the semstreams platform
Package types contains shared domain types used across the semstreams platform
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComponentConfig ¶
type ComponentConfig struct {
Type ComponentType `json:"type"` // Component type (input/processor/output/storage/gateway)
Name string `json:"name"` // Factory/component name (e.g., "udp", "websocket", "mavlink")
Enabled bool `json:"enabled"` // Whether component is enabled
Config json.RawMessage `json:"config"` // Component-specific configuration
}
ComponentConfig provides configuration for creating a component instance The instance name comes from the map key in the components configuration. This structure is shared between the config and component packages.
func (ComponentConfig) Validate ¶
func (c ComponentConfig) Validate() error
Validate ensures the component configuration is valid
type ComponentType ¶
type ComponentType string
ComponentType represents the category of a component
const ( ComponentTypeInput ComponentType = "input" ComponentTypeProcessor ComponentType = "processor" ComponentTypeOutput ComponentType = "output" ComponentTypeStorage ComponentType = "storage" ComponentTypeGateway ComponentType = "gateway" )
Component type constants
func (ComponentType) String ¶
func (ct ComponentType) String() string
String implements fmt.Stringer for ComponentType
type PlatformMeta ¶
type PlatformMeta struct {
Org string // Organization namespace (e.g., "c360", "noaa")
Platform string // Platform identifier (e.g., "platform1", "vessel-alpha")
}
PlatformMeta provides platform identity to services and components. This structure decouples platform identity from the config package, allowing services to access org and platform information without creating dependencies on configuration structures.
type ServiceConfig ¶
type ServiceConfig struct {
Name string `json:"name"` // Service name (redundant with map key but useful for validation)
Enabled bool `json:"enabled"` // Whether service is enabled at runtime
Config json.RawMessage `json:"config"` // Service-specific configuration
}
ServiceConfig provides configuration for creating a service instance. This standardizes service configuration similar to ComponentConfig, providing metadata (name, enabled) separate from service-specific config.
func (ServiceConfig) Validate ¶
func (s ServiceConfig) Validate() error
Validate ensures the service configuration is valid
type ServiceConfigs ¶
type ServiceConfigs map[string]ServiceConfig
ServiceConfigs holds service instance configurations. The map key is the service name (e.g., "metrics", "discovery"). Services are only created if both: 1. They have registered a constructor via init() 2. They have an entry in this config map with enabled=true