snapshot

package
v0.0.119 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config is a mapped representation of the config at a particular point in time

func Observe

func Observe(ctx context.Context, log logrus.FieldLogger, client gcs.ConditionalClient, configPath gcs.Path, update OnConfigUpdate) (*Config, error)

Observe will continuously keep the config up-to-date. If it the config changes, the callback will be called. Runs continuously until the context expires.

func (*Config) AllDashboards

func (cs *Config) AllDashboards() []*configpb.Dashboard

AllDashboards returns all dashboards

func (*Config) Dashboard

func (cs *Config) Dashboard(name string) *configpb.Dashboard

Dashboard returns a dashboard's configuration

func (*Config) DashboardTestGroups

func (cs *Config) DashboardTestGroups(dashboardName string) (*configpb.Dashboard, map[string]*configpb.TestGroup)

DashboardTestGroups returns a dashboard's configuration and a map containing:

Each dashboard tabs name -> the configuration of the test group backing it

func (*Config) Group

func (cs *Config) Group(name string) *configpb.TestGroup

Group returns a test group's configuration

type OnConfigUpdate

type OnConfigUpdate func(*Config) error

OnConfigUpdate is a function to be called whenever the config is found to have changed Errors returned by this will be logged, but will not stop the config update.

Jump to

Keyboard shortcuts

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