package dashboard

import "golang.org/x/build/cmd/coordinator/internal/dashboard"

Package dashboard contains the implementation of the build dashboard for the Coordinator.

Index

Types

type Commit

type Commit struct {
	PackagePath string // (empty for main repo commits)
	Hash        string

	// ResultData is the Data string of each build Result for this Commit.
	// For non-Go commits, only the Results for the current Go tip, weekly,
	// and release Tags are stored here. This is purely de-normalized data.
	// The complete data set is stored in Result entities.
	//
	// Each string is formatted as builder|OK|LogHash|GoHash.
	ResultData []string `datastore:",noindex"`
}

A Commit describes an individual commit in a package.

Each Commit entity is a descendant of its associated Package entity. In other words, all Commits with the same PackagePath belong to the same datastore entity group.

type Handler

type Handler struct {
	// Datastore is a client used for fetching build status. If nil, it uses in-memory storage of build status.
	Datastore *datastore.Client
	// Maintner is a client for Maintner, used for fetching lists of commits.
	Maintner MaintnerClient
	// LUCI is a client for LUCI, used for fetching build results from there.
	LUCI luciClient
	// contains filtered or unexported fields
}

func (*Handler) ServeHTTP

func (d *Handler) ServeHTTP(w http.ResponseWriter, req *http.Request)

type MaintnerClient

type MaintnerClient interface {
	// GetDashboard is extracted from apipb.MaintnerServiceClient.
	GetDashboard(ctx context.Context, in *apipb.DashboardRequest, opts ...grpc.CallOption) (*apipb.DashboardResponse, error)
}

MaintnerClient is a subset of apipb.MaintnerServiceClient.

Source Files

datastore.go handler.go

Version
v0.0.0-20250421191922-3619c213cff3 (latest)
Published
Apr 21, 2025
Platform
linux/amd64
Imports
20 packages
Last checked
2 months ago

Tools for package owners.