Documentation
¶
Index ¶
- Constants
- func Begin(ctx context.Context, id string) context.Context
- func Outcome(ctx context.Context, outcome, reason string)
- func Result(ctx context.Context, outcome string) string
- func Update(ctx context.Context, change func(*Record))
- type Page
- type Query
- type Record
- type Recorder
- type Statistics
Constants ¶
View Source
const Capacity = 2000
View Source
const Retention = 30 * time.Minute
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Page ¶
type Page struct {
Persisted bool `json:"persisted"`
StorageFailures uint64 `json:"storage_failures"`
RetentionDays int `json:"retention_days"`
WindowEnd time.Time `json:"window_end"`
Records []Record `json:"requests"`
NextCursor uint64 `json:"next_cursor"`
Statistics Statistics `json:"statistics"`
WindowStart time.Time `json:"window_start"`
Capacity int `json:"capacity"`
}
type Record ¶
type Record struct {
CredentialID string `json:"credential_id,omitempty"`
UpstreamAccount string `json:"upstream_account,omitempty"`
Sequence uint64 `json:"sequence"`
RequestID string `json:"request_id"`
StartedAt time.Time `json:"started_at"`
CompletedAt time.Time `json:"completed_at"`
DurationMS int64 `json:"duration_ms"`
Method string `json:"method"`
Endpoint string `json:"endpoint"`
Tool string `json:"tool"`
Subject string `json:"subject"`
ClientID string `json:"client_id"`
GrantID string `json:"grant_id"`
Outcome string `json:"outcome"`
Reason string `json:"reason,omitempty"`
HTTPStatus int `json:"http_status"`
ApprovalID string `json:"approval_id,omitempty"`
ApprovalWaitMS int64 `json:"approval_wait_ms,omitempty"`
}
Records contain routing and outcome metadata only. Never add arguments, resource values, response bodies, tokens or arbitrary error strings here.
Click to show internal directories.
Click to hide internal directories.