Documentation ¶
Overview ¶
Package config contains the interactions with the configuration service for global configuration files including reading, validating, etc.
Index ¶
- Constants
- Variables
- func GetSettingsCfg(ctx context.Context) (*pb.SettingsCfg, error)
- func ParseDimension(d string) (exp int64, k string, v string)
- func SetTestSettingsCfg(ctx context.Context, cfg *pb.SettingsCfg) error
- func UpdateProjectCfg(ctx context.Context) error
- func UpdateSettingsCfg(ctx context.Context) error
- func ValidateExperimentName(expName string, wellKnownExperiments stringset.Set) error
- func ValidateTaskBackendTarget(globalCfg *pb.SettingsCfg, target string) error
Constants ¶
const CurrentBucketSchemaVersion = 14
Variables ¶
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 ¶
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 ¶
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 ¶
UpdateSettingsCfg is called from a cron periodically to import settings.cfg into datastore.
func ValidateExperimentName ¶
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.