Documentation
¶
Index ¶
- Constants
- func WithScope(ctx context.Context, metadata map[string]any) context.Context
- type Aggregator
- type ComponentSnapshot
- type Config
- type EdgeSnapshot
- type Event
- type FeedEvent
- type HealthSnapshot
- type LatencySnapshot
- type PathSnapshot
- type Publisher
- type QueueSnapshot
- type Server
- type Snapshot
- type WindowSnapshot
Constants ¶
View Source
const ( ComponentIngress = "ingress" ComponentTransport = "transport" ComponentExecution = "execution" ComponentEgress = "egress" )
View Source
const ( TypeRequestStart = "request_start" TypeRequestEnd = "request_end" TypeBatch = "batch" TypeQueueDepth = "queue_depth" TypeError = "error" TypeStall = "stall" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Aggregator ¶
type Aggregator struct {
// contains filtered or unexported fields
}
func NewAggregator ¶
func NewAggregator(cfg Config) *Aggregator
func (*Aggregator) Close ¶
func (a *Aggregator) Close()
func (*Aggregator) History ¶
func (a *Aggregator) History() []Snapshot
func (*Aggregator) Publish ¶
func (a *Aggregator) Publish(evt Event) bool
func (*Aggregator) Snapshot ¶
func (a *Aggregator) Snapshot() Snapshot
func (*Aggregator) Subscribe ¶
func (a *Aggregator) Subscribe() (<-chan Snapshot, func())
type ComponentSnapshot ¶
type ComponentSnapshot struct {
Name string `json:"name"`
Status string `json:"status"`
Pressure string `json:"pressure"`
Active int64 `json:"active"`
RowsPerSecond float64 `json:"rows_per_second"`
BytesPerSecond float64 `json:"bytes_per_second"`
ErrorRate float64 `json:"error_rate"`
Latency LatencySnapshot `json:"latency"`
Queue QueueSnapshot `json:"queue"`
Windows map[string]WindowSnapshot `json:"windows"`
}
type EdgeSnapshot ¶
type Event ¶
type FeedEvent ¶
type FeedEvent struct {
Time time.Time `json:"time"`
Path string `json:"path"`
Component string `json:"component"`
Type string `json:"type"`
Message string `json:"message"`
Rows int64 `json:"rows"`
Bytes int64 `json:"bytes"`
LatencyMS float64 `json:"latency_ms"`
QueueDepth int64 `json:"queue_depth"`
}
type HealthSnapshot ¶
type LatencySnapshot ¶
type PathSnapshot ¶
type QueueSnapshot ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(aggregator *Aggregator) *Server
type Snapshot ¶
type Snapshot struct {
Time time.Time `json:"time"`
Components []ComponentSnapshot `json:"components"`
Edges []EdgeSnapshot `json:"edges"`
Paths []PathSnapshot `json:"paths"`
Feed []FeedEvent `json:"feed,omitempty"`
Health HealthSnapshot `json:"health"`
DroppedEvents uint64 `json:"dropped_events"`
}
type WindowSnapshot ¶
Click to show internal directories.
Click to hide internal directories.