Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AugmentedFragment ¶
type Fragment ¶
type Fragment struct {
// Namespace is the fragment's identity and the prefix applied to all receiver
// and route receiver names during assembly. Auto-set to the directory basename
// if not declared in YAML.
Namespace string `yaml:"namespace,omitempty"`
Group *FragmentGroup `yaml:"group,omitempty"`
Routes []*config.Route `yaml:"routes,omitempty"`
Receivers []*types.Receiver `yaml:"receivers,omitempty"`
InhibitRules []config.InhibitRule `yaml:"inhibit_rules,omitempty"`
// Deprecated. Remove before v1.0 release.
MuteTimeIntervals []config.MuteTimeInterval `yaml:"mute_time_intervals,omitempty" json:"mute_time_intervals,omitempty"`
TimeIntervals []config.TimeInterval `yaml:"time_intervals,omitempty" json:"time_intervals,omitempty"`
// Tests are discovered from sibling *-tests.yml files and tests/ subdirectory
// via dedicated parsing (see testDoc). Never serialized as part of the
// Fragment YAML — yaml:"-" suppresses both encode and decode.
Tests []*types.TestCase `yaml:"-"`
// contains filtered or unexported fields
}
type FragmentGroup ¶
type LoadResult ¶
type LoadResult struct {
Fragments []AugmentedFragment `yaml:"fragments,omitempty"`
}
func Load ¶
func Load(dir string) (*LoadResult, error)
Click to show internal directories.
Click to hide internal directories.