consoleserver

package
v0.0.0-...-a77d6fb Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: BSD-3-Clause Imports: 60 Imported by: 0

Documentation

Overview

Package consoleserver is the implementation of the backend of the console UI.

Index

Constants

View Source
const (
	DefaultPageSize      = 10
	ExpectedEtaColumnKey = "expected_eta" // computed column key, doesn't exist in the db
	SlippageColumnKey    = "slippage"     // computed column key, doesn't exist in the db
)
View Source
const (
	LOCAL_DB_CONNECTION_URL = "postgresql://postgres:password@localhost:5432/postgres"
)

Variables

This section is empty.

Functions

func BigQueryValueToDate

func BigQueryValueToDate(value bigquery.Value) (date *fleetconsolerpc.DateOnly)

func EnsureNoNilValuesInDb

func EnsureNoNilValuesInDb(ctx context.Context) error

func InstallServices

func InstallServices(consoleFrontend fleetconsolerpc.FleetConsoleServer, srv grpc.ServiceRegistrar)

InstallServices installs services into the server.

func NewFleetConsoleFrontend

func NewFleetConsoleFrontend() fleetconsolerpc.FleetConsoleServer

NewFleetConsoleFrontend creates a new fleet console frontend.

func SetAdminServiceAddress

func SetAdminServiceAddress(consoleFrontend *FleetConsoleFrontend, adminServiceAddress string)

SetAdminServiceAddress sets the admin service address.

func SetCIPDVersion

func SetCIPDVersion(consoleFrontend *FleetConsoleFrontend, cipdVersion buildbucket.CIPDVersion)

SetCIPDVersion sets the CIPD version.

func SetCloudProject

func SetCloudProject(consoleFrontend *FleetConsoleFrontend, cloudProject string)

SetCloudProject sets the cloud project.

func SetDeviceManagerClient

func SetDeviceManagerClient(consoleFrontend *FleetConsoleFrontend, deviceManagerClient func(context.Context, bool) (*devicemanagerclient.Client, error))

SetDeviceManagerClient sets the device manager client.

func SetInventoryNamespace

func SetInventoryNamespace(consoleFrontend *FleetConsoleFrontend, inventoryNamespace string)

SetInventoryNamespace sets the inventory namespace.

func SetInventoryServiceAddress

func SetInventoryServiceAddress(consoleFrontend *FleetConsoleFrontend, inventoryServiceAddress string)

SetInventoryServiceAddress sets the inventory service address.

func SetSwarmingClient

func SetSwarmingClient(consoleFrontend *FleetConsoleFrontend, swarmingClient swarmingClientFactory)

SetSwarmingClient sets the swarming client.

func SetUFSClient

func SetUFSClient(consoleFrontend *FleetConsoleFrontend, ufsClient func(context.Context, bool) (ufsclient.Client, error))

SetUFSClient sets the UFS client.

Types

type FleetConsoleFrontend

type FleetConsoleFrontend struct {
	fleetconsolerpc.UnimplementedFleetConsoleServer
	// contains filtered or unexported fields
}

FleetConsoleFrontend is the fleet console frontend.

func (*FleetConsoleFrontend) CleanExit

CleanExit exits the current process.

func (*FleetConsoleFrontend) CleanupAndroidDevices

CleanupAndroidDevices does cleanup stuff for android data

func (*FleetConsoleFrontend) CountBrowserDevices

func (*FleetConsoleFrontend) CountDevices

func (*FleetConsoleFrontend) CountRepairMetrics

CountDevices lists devices from the db.

func (*FleetConsoleFrontend) CountResourceRequests

func (*FleetConsoleFrontend) GetBrowserDeviceDimensions

GetBrowserDeviceDimensions returns dimensions of all browser devices

func (*FleetConsoleFrontend) GetDeviceDimensions

GetDeviceDimensions returns dimensions of all devices

func (*FleetConsoleFrontend) GetRepairMetricsDimensions

GetDeviceDimensions returns dimensions of all devices

func (*FleetConsoleFrontend) GetResourceRequestsMultiselectFilterValues

GetResourceRequestsMultiselectFilterValues lists resource requests.

func (*FleetConsoleFrontend) IsProdEnvironment

func (frontend *FleetConsoleFrontend) IsProdEnvironment() bool

func (*FleetConsoleFrontend) ListAndroidDevices

ListAndroidDevices lists devices from the db.

func (*FleetConsoleFrontend) ListBrowserDevices

ListBrowserDevices lists devices from the db.

func (*FleetConsoleFrontend) ListDevices

ListDevices lists devices from the db.

func (*FleetConsoleFrontend) ListProductCatalogEntries

ListProductCatalogEntries implements the RPC handler for listing product catalog entries.

func (*FleetConsoleFrontend) ListRepairMetrics

ListDevices lists devices from the db.

func (*FleetConsoleFrontend) ListResourceRequests

ListResourceRequests lists resource requests.

func (*FleetConsoleFrontend) Ping

Ping is the ping RPC. It responds with an empty response and never fails.

func (*FleetConsoleFrontend) PingBigQuery

PingBigQuery pings the mock BQ database with a random query and logs the results.

func (*FleetConsoleFrontend) PingDB

PingDB pings the database.

func (*FleetConsoleFrontend) PingDeviceManager

PingDeviceManager pings device manager.

func (*FleetConsoleFrontend) PingSwarming

PingSwarming pings the swarming service.

func (*FleetConsoleFrontend) PingUfs

PingUfs pings UFS.

func (*FleetConsoleFrontend) RepopulateAndroidCache

RepopulateAndroidCache repopulates the Android cache from UFS.

func (*FleetConsoleFrontend) RepopulateBrowserCache

RepopulateBrowserCache repopulates the browser devices cache.

func (*FleetConsoleFrontend) RepopulateCache

RepopulateCache repopulates the AlloyDB cache.

func (*FleetConsoleFrontend) ScheduleAutorepair

func (*FleetConsoleFrontend) ScheduleBuild

func (*FleetConsoleFrontend) SyncProductCatalog

func (s *FleetConsoleFrontend) SyncProductCatalog(ctx context.Context) error

SyncProductCatalog is a cron handler that syncs the product catalog from the config to the database.

func (*FleetConsoleFrontend) UpdateAndroidDevices

UpdateAndroidDevices receives a LabResource message and process it. Maybe this shouldn't be part of FleetConsoleFrontend

func (*FleetConsoleFrontend) UpdateAndroidMetrics

type LabelRow

type LabelRow struct {
	Key   string `sql:"key"`
	Value string `sql:"value"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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