report

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

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

Generator assembles and renders incident reports.

func New

func New(incidents incident.IncidentStore, regressions regression.RegressionStore, traces dataplane.TraceReader) *Generator

New creates a new Generator. traces may be nil if trace data is unavailable.

func (*Generator) Generate

func (g *Generator) Generate(ctx context.Context, id string, format string) ([]byte, string, error)

Generate assembles data for the incident identified by id and renders it in the requested format ("json", "csv", or "html"). It returns the content bytes, a content-type string, and any error.

type Report

type Report struct {
	Incident    incident.Incident       `json:"incident"`
	Regressions []regression.Regression `json:"regressions"`
	Timeline    []TimelineEntry         `json:"timeline"`
	GeneratedAt time.Time               `json:"generated_at"`
}

Report is the assembled data for an incident report.

type TimelineEntry

type TimelineEntry struct {
	Time    time.Time `json:"time"`
	Event   string    `json:"event"`
	Details string    `json:"details"`
}

TimelineEntry is a single event on the incident timeline.

Jump to

Keyboard shortcuts

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