config

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var QoSServiceConfigs = qosServiceConfigs{
	// contains filtered or unexported fields
}

The QoSServiceConfigs map associates each supported service ID with a specific implementation of the gateway.QoSService interface.

Functions

This section is empty.

Types

type EndpointHydratorConfig

type EndpointHydratorConfig struct {
	// List of service IDs to disable QoS checks for.
	// By default all configured service IDs will be checked unless specified here.
	// Startup will error if a service ID is specified here that is not in the protocol's configured service IDs.
	// Primarily just used for testing & development.
	QoSDisabledServiceIDs []protocol.ServiceID `yaml:"qos_disabled_service_ids"`

	// Interval between hydrator runs during which endpoint checks are performed
	RunInterval time.Duration `yaml:"run_interval_ms"`

	// Maximum number of concurrent endpoint check workers for performance tuning
	MaxEndpointCheckWorkers int `yaml:"max_endpoint_check_workers"`
}

EndpointHydratorConfig stores configuration settings for running an Endpoint Hydrator instance to collect observations about service endpoints. The hydrator will not start without specified service IDs.

type GatewayConfig

type GatewayConfig struct {
	ShannonConfig      *shannon.ShannonGatewayConfig `yaml:"shannon_config"`
	Router             RouterConfig                  `yaml:"router_config"`
	Logger             LoggerConfig                  `yaml:"logger_config"`
	HydratorConfig     EndpointHydratorConfig        `yaml:"hydrator_config"`
	MessagingConfig    MessagingConfig               `yaml:"messaging_config"`
	DataReporterConfig HTTPDataReporterConfig        `yaml:"data_reporter_config"`
}

GatewayConfig contains all configuration details needed to operate a gateway, parsed from a YAML config file.

func LoadGatewayConfigFromYAML

func LoadGatewayConfigFromYAML(path string) (GatewayConfig, error)

LoadGatewayConfigFromYAML reads a YAML configuration file from the specified path and unmarshals its content into a GatewayConfig instance.

func (*GatewayConfig) GetGatewayConfig

func (c *GatewayConfig) GetGatewayConfig() *shannon.ShannonGatewayConfig

func (*GatewayConfig) GetRouterConfig

func (c *GatewayConfig) GetRouterConfig() RouterConfig

type HTTPDataReporterConfig

type HTTPDataReporterConfig struct {
	// HTTP endpoint for data delivery.
	// Example: Fluentd HTTP input plugin address.
	TargetURL string `yaml:"target_url"`

	// Timeout in milliseconds for HTTP POST operations.
	// If zero or negative, a default timeout will be used.
	PostTimeoutMS int `yaml:"post_timeout_ms"`
}

HTTPDataReporterConfig defines settings for HTTP-based data reporting. Only JSON-accepting data pipelines are supported as of PR #215 e.g. Fluentd (HTTP input plugin → BigQuery Output plugin) → BigQuery

type LoggerConfig

type LoggerConfig struct {
	// Level sets the minimum log level. Valid values are:
	// "debug", "info", "warn", "error"
	Level string `yaml:"level"`
}

LoggerConfig contains logger configuration settings

func (LoggerConfig) Validate

func (c LoggerConfig) Validate() error

Validate ensures the logger configuration is valid

type MessagingConfig

type MessagingConfig struct{}

TODO_MVP(@adshmh): add messaging system(s) configuration settings to the MessagingConfig placeholder struct.

MessagingConfig holds the configuration settings for the messaging system(s), e.g. NATS, REDIS, used by PATH.

type RouterConfig

type RouterConfig struct {
	Port                            int           `yaml:"port"`
	MaxRequestHeaderBytes           int           `yaml:"max_request_header_bytes"`
	ReadTimeout                     time.Duration `yaml:"read_timeout"`
	WriteTimeout                    time.Duration `yaml:"write_timeout"`
	IdleTimeout                     time.Duration `yaml:"idle_timeout"`
	SystemOverheadAllowanceDuration time.Duration `yaml:"system_overhead_allowance_duration"`
	// WebsocketMessageBufferSize is the buffer size for websocket message observation channels.
	// Larger values use more memory but can handle higher message throughput.
	// Default: 50 (prevents OOM while maintaining reasonable throughput)
	WebsocketMessageBufferSize int `yaml:"websocket_message_buffer_size"`
}

RouterConfig contains server configuration settings. See default values above.

type ServiceQoSConfig

type ServiceQoSConfig interface {
	GetServiceID() protocol.ServiceID
	GetServiceQoSType() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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