Documentation
¶
Overview ¶
Package traceserve serves a trace results store through query: the traces/<kind> result profiles, the sessions API over its captures (their exports and checkpoints) and the query app, as one handler a host mounts under a path of its own. gavel mounts it over a run's store; `query serve` opens its own store through the same Open.
Index ¶
Constants ¶
View Source
const ( // Prefix names a store's result profiles, traces/<kind>, and its index // connection, connection://traces/traces. Prefix = "traces" // ProfilePrefix is the name of a kind's result profile less the kind. ProfilePrefix = tracing.ProfilePrefix // APIPrefix is where Handler serves the profile and sessions APIs, under // the path the host mounts it at. APIPrefix = "/api/v1" )
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
Handler serves options.Runtime's store, rooted at the path the host mounts it at (strip that prefix before it):
GET /api/openapi.json the result profiles and session routes
GET /api/v1/profile/traces%2F{kind} a window of a stream (?stream, ?afterSeq, ?toSeq)
GET /api/v1/traces/{kind}/export a window downloaded (?stream, ?afterSeq, ?toSeq, ?format)
POST /api/v1/sessions/{id}/checkpoint a running capture's reading, committed
/api/v1/sessions... the sessions API over the captures
GET /traces/{kind} the app's page for a window (?stream, ?afterSeq, ?toSeq)
GET /... the query app
Types ¶
type OpenOptions ¶
type OpenOptions struct {
// Dir is the store's directory; Open creates it when it does not exist.
Dir string
// Kinds declares the result types the store's streams hold.
Kinds *tracing.Kinds
// Retention is how long a stream is kept; an expired one is swept away.
Retention time.Duration
}
OpenOptions say which store Open opens and what it serves.
type Options ¶
type Options struct {
// Runtime is the open store served, and the captures running into it.
Runtime *tracing.Runtime
// Authorize decides what a caller may do with a capture; ReadOnly serves
// the store without letting a caller start or stop one. Nil allows all.
Authorize sessions.AuthorizeFunc
}
Options configure Handler.
Click to show internal directories.
Click to hide internal directories.