Documentation ¶
Index ¶
Constants ¶
const (
// ConfigName is the name of the config map for mako options.
ConfigName = "config-mako"
)
Variables ¶
This section is empty.
Functions ¶
func GetOrganization ¶
func GetOrganization() string
GetOrganization returns the organization from the configmap. It will return the defaultOrg if any error happens or it's empty.
func GetRepository ¶
func GetRepository() string
GetRepository returns the repository from the configmap. It will return an empty string if any error happens.
func MustGetBenchmark ¶
MustGetBenchmark wraps getBenchmark in log.Fatalf
func MustGetTags ¶
func MustGetTags() []string
MustGetTags returns the additional tags from the configmap, or dies.
Types ¶
type Channel ¶
type Channel struct { Name string `yaml:"name,omitempty"` Identity string `yaml:"identity,omitempty"` }
Channel contains Slack channel's info.
func GetSlackChannels ¶
GetSlackChannels returns the slack channels to alert on for the given benchmark. If any error happens, or the config is not found, return the default channel.
type Config ¶
type Config struct { // Organization holds the name of the organization for the current repository. Organization string // Repository holds the name of the repository that runs the benchmarks. Repository string // Environment holds the name of the environement, // where the test runs, e.g. `dev`. Environment string // List of additional tags to apply to the run. AdditionalTags []string // SlackConfig holds the slack configurations for the benchmarks, // it's used to determine which slack channels to alert on if there is performance regression. SlackConfig string }
Config defines the mako configuration options.
func NewConfigFromConfigMap ¶
NewConfigFromConfigMap creates a Config from the supplied ConfigMap
type SlackConfig ¶
type SlackConfig struct {
BenchmarkChannels map[string][]Channel `yaml:"benchmarkChannels,omitempty"`
}
SlackConfig contains slack configuration for the benchmarks.