config

package
v0.0.0-...-d3da680 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package config implements service-level config for LUCI Tree Status.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFoundTreeConfig = fmt.Errorf("tree config not found")

ErrNotFoundTreeConfig will be returned if configuration for a given project does not exist.

Functions

func Get

func Get(ctx context.Context) (*configpb.Config, error)

Get returns the config stored in the context.

func GetTreeConfig

func GetTreeConfig(ctx context.Context, treeName string) (*configpb.Tree, error)

GetTreeConfig returns config for a tree name. If the config for the tree name is not found, it will return an ErrNotFoundTreeConfig error.

func SetConfig

func SetConfig(ctx context.Context, cfg *configpb.Config) error

SetConfig installs the config into the context ctx. This is only used for the purpose of testing.

func TestConfig

func TestConfig() *configpb.Config

func Update

func Update(ctx context.Context) error

Update fetches the config and puts it into the datastore.

Types

This section is empty.

Jump to

Keyboard shortcuts

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