util

package
v0.0.174 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package util has convenience functions for use throughout TestGrid.

Index

Constants

This section is empty.

Variables

View Source
var (

	// Substitute a particular custom column value for this token.
	// TODO: Handle start/end columns (for custom columns and build IDs).
	CustomColumnRe = regexp.MustCompile(`<custom-\d+>`)

	// Simple tokens.
	TestStatus      = "<test-status>"
	TestID          = "<test-id>"
	WorkflowID      = "<workflow-id>"
	WorkflowName    = "<workflow-name>"
	TestName        = "<test-name>"
	DisplayName     = "<display-name>"
	MethodName      = "<method-name>"
	TestURL         = "<test-url>"
	BuildID         = "<build-id>"
	BugComponent    = "<bug-component>"
	Owner           = "<owner>"
	Cc              = "<cc>"
	GcsPrefix       = "<gcs-prefix>"
	Environment     = "<environment>" // dashboard tab name
	ResultsExplorer = "<results-explorer>"
	CodeSearchPath  = "<cs-path>"
)

Functions

func ExpandTemplate added in v0.0.167

func ExpandTemplate(template *configpb.LinkTemplate, parameters map[string]string) (string, error)

ExpandTemplate expands the given link template with given parameters.

func Progress

func Progress(ctx context.Context, log logrus.FieldLogger, every time.Duration, total int, msg string) func(int)

Progress log every duration, including an ETA for completion. Returns a function for updating the current index

func Tokens added in v0.0.167

func Tokens(template *configpb.LinkTemplate) []string

Tokens returns the unique list of all Tokens that could be replaced in this template.

Types

type Strings added in v0.0.110

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

Strings represents the value of a flag that accept multiple strings.

func (*Strings) Set added in v0.0.110

func (s *Strings) Set(value string) error

Set records the value passed

func (*Strings) String added in v0.0.110

func (s *Strings) String() string

String returns a concatenated string of all the values joined by commas.

func (*Strings) Strings added in v0.0.110

func (s *Strings) Strings() []string

Strings returns the slice of strings set for this value instance.

Directories

Path Synopsis
gcs
Package gcs provides utilities for interacting with GCS.
Package gcs provides utilities for interacting with GCS.
Package metrics provides metric reporting for TestGrid components.
Package metrics provides metric reporting for TestGrid components.
Package queue contains methods and structures for manipulating and persisting data that should be repeatedly processed in a prioritized (but changing) order.
Package queue contains methods and structures for manipulating and persisting data that should be repeatedly processed in a prioritized (but changing) order.

Jump to

Keyboard shortcuts

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