Documentation
¶
Index ¶
- type EventContext
- func (e *EventContext) HasDecision() bool
- func (e *EventContext) Publish()
- func (e *EventContext) SetDecision(decision string)
- func (e *EventContext) SetError(err error)
- func (e *EventContext) SetExtras(extras any)
- func (e *EventContext) SetMode(mode string)
- func (e *EventContext) SetSLatency(duration time.Duration)
- func (e *EventContext) SetScore(score float64, label string)
- func (e *EventContext) SetStatusCode(code int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventContext ¶
type EventContext struct {
// contains filtered or unexported fields
}
func NewEventContext ¶
func NewEventContext(span *trace.Span) *EventContext
func (*EventContext) HasDecision ¶
func (e *EventContext) HasDecision() bool
func (*EventContext) Publish ¶
func (e *EventContext) Publish()
func (*EventContext) SetDecision ¶
func (e *EventContext) SetDecision(decision string)
func (*EventContext) SetError ¶
func (e *EventContext) SetError(err error)
func (*EventContext) SetExtras ¶
func (e *EventContext) SetExtras(extras any)
func (*EventContext) SetMode ¶
func (e *EventContext) SetMode(mode string)
func (*EventContext) SetSLatency ¶
func (e *EventContext) SetSLatency(duration time.Duration)
func (*EventContext) SetScore ¶ added in v0.19.0
func (e *EventContext) SetScore(score float64, label string)
SetScore records the detection score and its label on the metrics span. The label is what the analytics Security Engine breakdown groups by, so security plugins should pass the detected category (e.g. the moderation category or the guard signal type) rather than a plugin-internal identifier.
func (*EventContext) SetStatusCode ¶
func (e *EventContext) SetStatusCode(code int)
Directories
¶
| Path | Synopsis |
|---|---|
|
Package playground stores the metrics Event of playground proxy requests in Redis so the dashboard can fetch the trace by TraceID (the X-AG-Trace-Id echoed in the proxy response).
|
Package playground stores the metrics Event of playground proxy requests in Redis so the dashboard can fetch the trace by TraceID (the X-AG-Trace-Id echoed in the proxy response). |
Click to show internal directories.
Click to hide internal directories.