buildlog

package
v0.0.0-...-6877637 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Overview

Package buildlog provides a build log viewer for Spyglass

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lens

type Lens struct{}

Lens implements the build lens.

func (Lens) Body

func (lens Lens) Body(artifacts []api.Artifact, resourceDir string, data string, rawConfig json.RawMessage, spyglassConfig prowconfig.Spyglass) string

Body returns the <body> content for a build log (or multiple build logs)

func (Lens) Callback

func (lens Lens) Callback(artifacts []api.Artifact, resourceDir string, data string, rawConfig json.RawMessage, spyglassConfig prowconfig.Spyglass) string

Callback is used to retrieve new log segments

func (Lens) Config

func (lens Lens) Config() lenses.LensConfig

Config returns the lens's configuration.

func (Lens) Header

func (lens Lens) Header(artifacts []api.Artifact, resourceDir string, config json.RawMessage, spyglassConfig prowconfig.Spyglass) string

Header executes the "header" section of the template.

type LineGroup

type LineGroup struct {
	Skip                   bool
	Start, End             int // closed, open
	ByteOffset, ByteLength int64
	LogLines               []LogLine
	ArtifactName           *string
}

LineGroup holds multiple lines that can be collapsed/expanded as a block

func (LineGroup) Expand

func (g LineGroup) Expand() bool

func (LineGroup) LinesSkipped

func (g LineGroup) LinesSkipped() int

LinesSkipped returns the number of lines skipped in a line group.

type LogArtifactView

type LogArtifactView struct {
	ArtifactName string
	ArtifactLink string
	LineGroups   []LineGroup
	ViewAll      bool
	ShowRawLog   bool
	CanSave      bool
	CanAnalyze   bool
}

LogArtifactView holds a single log file's view

type LogLine

type LogLine struct {
	ArtifactName *string
	Number       int
	Length       int
	Highlighted  bool
	Skip         bool
	SubLines     []SubLine
	Focused      bool
	Clip         bool
}

LogLine represents a line displayed in the LogArtifactView.

type SubLine

type SubLine struct {
	Highlighted bool
	Text        string
}

SubLine represents an substring within a LogLine. It it used so error terms can be highlighted.

Jump to

Keyboard shortcuts

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