Documentation
¶
Overview ¶
Package topology owns the mode-selected service-topology read contract.
Index ¶
- type AggregateProvider
- func (p *AggregateProvider) Identity(context.Context) Identity
- func (p *AggregateProvider) PruneTopology()
- func (p *AggregateProvider) Snapshot(ctx context.Context, q Query) (Snapshot, error)
- func (*AggregateProvider) Source() Source
- func (p *AggregateProvider) TopologyEpoch() uint64
- func (p *AggregateProvider) TopologyRevision(tenant string) uint64
- func (p *AggregateProvider) TopologySnapshot(tenant string) aggregate.TopologySnapshot
- func (p *AggregateProvider) TopologyTenants() []string
- type Edge
- type Identity
- type LegacyProvider
- type Metadata
- type Node
- type Provider
- type Query
- type Snapshot
- type Source
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregateProvider ¶
type AggregateProvider struct {
// contains filtered or unexported fields
}
AggregateProvider is both the ordinary mode-selected provider and the narrow aggregate projection source GraphRAG already consumes.
func NewAggregateProvider ¶
func NewAggregateProvider(engine *aggregate.Engine) (*AggregateProvider, error)
func (*AggregateProvider) PruneTopology ¶
func (p *AggregateProvider) PruneTopology()
func (*AggregateProvider) Source ¶
func (*AggregateProvider) Source() Source
func (*AggregateProvider) TopologyEpoch ¶
func (p *AggregateProvider) TopologyEpoch() uint64
The following methods implement graphrag.AggregateSource. Keeping that projection narrow avoids teaching GraphRAG about range queries.
func (*AggregateProvider) TopologyRevision ¶
func (p *AggregateProvider) TopologyRevision(tenant string) uint64
func (*AggregateProvider) TopologySnapshot ¶
func (p *AggregateProvider) TopologySnapshot(tenant string) aggregate.TopologySnapshot
func (*AggregateProvider) TopologyTenants ¶
func (p *AggregateProvider) TopologyTenants() []string
type Edge ¶
type Edge struct {
Source string `json:"source"`
Target string `json:"target"`
CallCount int64 `json:"call_count"`
AvgLatencyMs float64 `json:"avg_latency_ms"`
ErrorRate float64 `json:"error_rate"`
Status string `json:"status,omitempty"`
}
Edge is one directed service dependency.
type Identity ¶
type Identity struct {
Epoch string `json:"epoch,omitempty"`
Revision uint64 `json:"revision,omitempty"`
}
Identity orders full-replacement snapshots within one process generation.
type LegacyProvider ¶
type LegacyProvider struct {
// contains filtered or unexported fields
}
LegacyProvider preserves the existing historical repository query and the current GraphRAG/graph/DB preference for live topology.
func NewLegacyProvider ¶
func (*LegacyProvider) Source ¶
func (*LegacyProvider) Source() Source
type Metadata ¶
type Metadata struct {
Source Source `json:"source,omitempty"`
Start time.Time `json:"start,omitempty"`
End time.Time `json:"end,omitempty"`
Coverage string `json:"coverage,omitempty"`
CoverageNote string `json:"coverage_note,omitempty"`
Epoch string `json:"epoch,omitempty"`
Revision uint64 `json:"revision,omitempty"`
Truncated bool `json:"truncated,omitempty"`
DroppedServices uint64 `json:"dropped_services,omitempty"`
DroppedOperations uint64 `json:"dropped_operations,omitempty"`
DroppedEdges uint64 `json:"dropped_edges,omitempty"`
DroppedMetrics uint64 `json:"dropped_metrics,omitempty"`
}
Metadata is additive ownership and completeness information.
type Node ¶
type Node struct {
Name string `json:"name"`
TotalTraces int64 `json:"total_traces"`
ErrorCount int64 `json:"error_count"`
AvgLatencyMs float64 `json:"avg_latency_ms"`
RequestRateRPS float64 `json:"request_rate_rps,omitempty"`
ErrorRate float64 `json:"error_rate,omitempty"`
P99LatencyMs float64 `json:"p99_latency_ms,omitempty"`
LatencyProvenance *latency.Provenance `json:"latency_provenance,omitempty"`
SpanCount int64 `json:"span_count,omitempty"`
HealthScore float64 `json:"health_score,omitempty"`
Status string `json:"status,omitempty"`
Alerts []string `json:"alerts,omitempty"`
}
Node is the wire-neutral service projection shared by all consumers.
type Provider ¶
type Provider interface {
Source() Source
Identity(context.Context) Identity
Snapshot(context.Context, Query) (Snapshot, error)
}
Provider is selected once from AGGREGATE_MODE and injected into every live topology consumer.
type Query ¶
Query selects a range and an optional closed set of services. A zero range asks for the provider's current live replacement.