config

package
v0.0.0-...-add0f8d Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Overview

Package config contains the interactions with the configuration service for global configuration files including reading, validating, etc.

Index

Constants

View Source
const CurrentBucketSchemaVersion = 14

Variables

View Source
var (

	// DefExecutionTimeout is the default value for pb.Build.ExecutionTimeout.
	// See setTimeouts.
	DefExecutionTimeout = 3 * time.Hour

	// DefSchedulingTimeout is the default value for pb.Build.SchedulingTimeout.
	// See setTimeouts.
	DefSchedulingTimeout = 6 * time.Hour
)

Functions

func GetSettingsCfg

func GetSettingsCfg(ctx context.Context) (*pb.SettingsCfg, error)

GetSettingsCfg fetches the settings.cfg from luci-config.

func ParseDimension

func ParseDimension(d string) (exp int64, k string, v string)

ParseDimension parses a dimension string. A dimension supports 2 forms - "<key>:<value>" and "<expiration_secs>:<key>:<value>" .

func SetTestSettingsCfg

func SetTestSettingsCfg(ctx context.Context, cfg *pb.SettingsCfg) error

SetTestSettingsCfg is used in tests only.

func UpdateProjectCfg

func UpdateProjectCfg(ctx context.Context) error

UpdateProjectCfg fetches all projects' Buildbucket configs from luci-config and update into Datastore. TODO(b/356205234): Currently the function is very convoluted and would benefit from a refactoring that splits it into multiple functions.

func UpdateSettingsCfg

func UpdateSettingsCfg(ctx context.Context) error

UpdateSettingsCfg is called from a cron periodically to import settings.cfg into datastore.

func ValidateExperimentName

func ValidateExperimentName(expName string, wellKnownExperiments stringset.Set) error

func ValidateTaskBackendTarget

func ValidateTaskBackendTarget(globalCfg *pb.SettingsCfg, target string) error

ValidateTaskBackendTarget validates the target value for a buildbucket task backend.

Types

This section is empty.

Jump to

Keyboard shortcuts

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