256b841cbf
Adds Go microservices (ingest-gateway, event-processor, query-api, web-ui), NATS+Postgres wiring, initial schema/init job, ingress manifests for LAN+tailnet, and a multi-arch image build script.
42 lines
1.1 KiB
Go
42 lines
1.1 KiB
Go
package event
|
|
|
|
type Schema struct {
|
|
Name string `json:"name"`
|
|
Version int `json:"version"`
|
|
}
|
|
|
|
type Source struct {
|
|
Framework string `json:"framework"`
|
|
ClientID string `json:"client_id"`
|
|
Host string `json:"host"`
|
|
User string `json:"user,omitempty"`
|
|
Version string `json:"version,omitempty"`
|
|
}
|
|
|
|
type EventMeta struct {
|
|
ID string `json:"id"`
|
|
Type string `json:"type"`
|
|
TS any `json:"ts"`
|
|
Seq *int64 `json:"seq,omitempty"`
|
|
|
|
Source Source `json:"source"`
|
|
}
|
|
|
|
type Correlation struct {
|
|
SessionID string `json:"session_id,omitempty"`
|
|
RunID string `json:"run_id,omitempty"`
|
|
TraceID string `json:"trace_id,omitempty"`
|
|
SpanID string `json:"span_id,omitempty"`
|
|
ParentSpanID string `json:"parent_span_id,omitempty"`
|
|
}
|
|
|
|
type Envelope struct {
|
|
Schema Schema `json:"schema"`
|
|
Event EventMeta `json:"event"`
|
|
Correlation *Correlation `json:"correlation,omitempty"`
|
|
Attributes map[string]any `json:"attributes,omitempty"`
|
|
Payload map[string]any `json:"payload,omitempty"`
|
|
Raw map[string]any `json:"-"`
|
|
Extra map[string]any `json:"-"`
|
|
}
|