Documentation
¶
Overview ¶
Package config provides configuration for SemStreams E2E tests
Package config provides configuration for SemStreams E2E tests
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ComponentPaths = struct { Base string Health string List string }{ Base: "/components", Health: "/components/health", List: "/components/list", }
ComponentPaths defines API paths for component endpoints
var DefaultEndpoints = struct { HTTP string UDP string NATS string Metrics string PProf string }{ HTTP: "http://localhost:38080", UDP: "localhost:34550", NATS: "nats://localhost:34222", Metrics: "http://localhost:39090", PProf: "http://localhost:36060", }
DefaultEndpoints provides default SemStreams service endpoints Ports use 3xxxx range to avoid collisions with other local services
var DefaultTestConfig = struct { // Test execution Timeout time.Duration RetryInterval time.Duration MaxRetries int ValidationDelay time.Duration // core data test config MessageCount int MessageInterval time.Duration MinProcessed int }{ Timeout: 10 * time.Second, RetryInterval: 1 * time.Second, MaxRetries: 30, ValidationDelay: 5 * time.Second, MessageCount: 10, MessageInterval: 100 * time.Millisecond, MinProcessed: 5, }
DefaultTestConfig provides default test configuration values
var ServicePaths = struct { Health string }{ Health: "/health", }
ServicePaths defines API paths for service endpoints
Functions ¶
This section is empty.
Types ¶
type ValidationConfig ¶
type ValidationConfig struct {
// MinStorageRate is the minimum acceptable ratio of stored to sent entities (default: 0.80)
MinStorageRate float64
// RequiredIndexes lists index buckets that must have entries after processing
RequiredIndexes []string
// RequiredMetrics lists Prometheus metrics that must be present after processing
RequiredMetrics []string
// ValidationTimeout is the maximum time to wait for processing before validation
ValidationTimeout time.Duration
}
ValidationConfig holds configurable validation thresholds for E2E tests
func DefaultValidationConfig ¶
func DefaultValidationConfig() *ValidationConfig
DefaultValidationConfig returns a ValidationConfig with sensible defaults
type ValidationResult ¶
type ValidationResult struct {
// EntitiesSent is the count of entities sent through the pipeline
EntitiesSent int
// EntitiesStored is the count of entities found in NATS KV
EntitiesStored int
// StorageRate is the ratio of stored to sent entities (0.0-1.0)
StorageRate float64
// IndexesChecked lists which indexes were validated
IndexesChecked []string
// IndexesPopulated is the count of indexes with at least one entry
IndexesPopulated int
// MetricsVerified lists Prometheus metrics found
MetricsVerified []string
// MetricsMissing lists expected metrics that were not found
MetricsMissing []string
}
ValidationResult contains the outcomes of NATS KV validation
func NewValidationResult ¶
func NewValidationResult(entitiesSent int) *ValidationResult
NewValidationResult creates a new ValidationResult with the given sent count
func (*ValidationResult) CalculateStorageRate ¶
func (r *ValidationResult) CalculateStorageRate()
CalculateStorageRate computes the storage rate from sent and stored counts
func (*ValidationResult) MeetsThreshold ¶
func (r *ValidationResult) MeetsThreshold(threshold float64) bool
MeetsThreshold returns true if the storage rate meets or exceeds the given threshold