config

package
v0.0.0-...-2cc3bea Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: Apache-2.0 Imports: 30 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.

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