traces

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRoute

func NewRoute(dp RouteDataProvider) web.Route

NewRoute returns the page for this folder.

Types

type DP

type DP struct {
	// contains filtered or unexported fields
}

DP provides the traces that match the page's query.

func NewDP

func NewDP(d *deps.Deps) *DP

NewDP returns the page's data provider.

func (*DP) Data

func (p *DP) Data(ctx context.Context, r *web.Request, _ web.ResponseWriter, data *RouteData) error

Data lists the apps for the filter and the traces that match the query.

func (*DP) Subscribe

func (p *DP) Subscribe(ctx context.Context, r *web.Request, state *ReactiveState) error

Subscribe lists the traces again at every change of the workspace.

type Query

type Query = devapi.TraceQuery

Query is what the page lists.

type ReactiveState

type ReactiveState struct {
	// contains filtered or unexported fields
}

ReactiveState sends new values of the page's live variables to one open page. Its Set methods may be called from any goroutine.

func (*ReactiveState) SetTraces

func (rs *ReactiveState) SetTraces(v Traces)

SetTraces stores v as traces and sends the parts of the page that show it.

type RouteData

type RouteData struct {
	Names  []string
	Query  Query
	Traces Traces
}

RouteData holds the variables the template declares with <ssr:var>.

type RouteDataProvider

type RouteDataProvider interface {
	Data(ctx context.Context, r *web.Request, w web.ResponseWriter, data *RouteData) error
	// Subscribe runs while the page is open and must return when ctx is done.
	Subscribe(ctx context.Context, r *web.Request, state *ReactiveState) error
}

RouteDataProvider is what this page's DP implements.

type Trace

type Trace struct {
	ID       string
	Stamp    string // the start as RFC 3339
	Start    string
	Root     string
	Apps     string
	Spans    int
	Duration string
	Error    bool
}

Trace sums up one trace as the page shows it.

type Traces

type Traces struct {
	// Traces are the newest traces, newest first.
	Traces []Trace
	// Problem is why the traces could not be listed.
	Problem string
}

Traces is what the page shows of the traces that match its query.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL