Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMissingFields = errors.New("missing_fields")
Functions ¶
This section is empty.
Types ¶
type Envelope ¶
type Envelope struct {
Timestamp string `json:"timestamp"`
TraceID string `json:"trace_id,omitempty"`
Source string `json:"source"`
EventType string `json:"event_type"`
Payload json.RawMessage `json:"payload"`
}
Envelope is the shared Sentinel event transport contract.
func NewEnvelope ¶
NewEnvelope builds a transport envelope from a structured payload.
func (*Envelope) EnsureTimestamp ¶
EnsureTimestamp fills an empty timestamp with the provided time.
func (*Envelope) SetTraceID ¶
SetTraceID records the trace ID that can be used to link the stored event row back to the distributed trace.
func (Envelope) TimestampTime ¶
TimestampTime parses the transport timestamp, falling back to now on malformed input.
Click to show internal directories.
Click to hide internal directories.