Documentation ¶
Index ¶
- type EventChecker
- type EventCheckerConf
- func ConfFromChecker(apiVersion, name, description string, checker eventchecker.MultiEventChecker) (*EventCheckerConf, error)
- func ConfFromSpec(apiVersion, name, description string, spec *MultiEventCheckerSpec) (*EventCheckerConf, error)
- func ReadYaml(data string) (*EventCheckerConf, error)
- func ReadYamlFile(file string) (*EventCheckerConf, error)
- func ReadYamlFileTemplate(file string, data interface{}) (*EventCheckerConf, error)
- func ReadYamlTemplate(text string, data interface{}) (*EventCheckerConf, error)
- type Metadata
- type MultiEventCheckerSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventChecker ¶
type EventChecker struct {
eventchecker.EventChecker
}
EventChecker is a wrapper around the EventChecker interface to help unmarshaling
func (EventChecker) MarshalJSON ¶
func (checker EventChecker) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface
func (*EventChecker) UnmarshalJSON ¶
func (checker *EventChecker) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the json.Unmarshaler interface
type EventCheckerConf ¶
type EventCheckerConf struct { APIVersion string `json:"apiVersion"` Kind string `json:"kind"` Metadata Metadata `json:"metadata"` Spec MultiEventCheckerSpec `json:"spec"` }
Metadata contains metadata for the eventchecker definition
func ConfFromChecker ¶
func ConfFromChecker(apiVersion, name, description string, checker eventchecker.MultiEventChecker) (*EventCheckerConf, error)
ConfFromChecker creates a new EventCheckerConf from a MultiEventChecker
func ConfFromSpec ¶
func ConfFromSpec(apiVersion, name, description string, spec *MultiEventCheckerSpec) (*EventCheckerConf, error)
ConfFromSpec creates a new EventCheckerConf from a MultiEventCheckerSpec
func ReadYaml ¶
func ReadYaml(data string) (*EventCheckerConf, error)
ReadYaml reads an event checker from yaml
func ReadYamlFile ¶
func ReadYamlFile(file string) (*EventCheckerConf, error)
ReadYamlFile reads an event checker from a yaml file
func ReadYamlFileTemplate ¶
func ReadYamlFileTemplate(file string, data interface{}) (*EventCheckerConf, error)
ReadYamlFileTemplate reads an event checker template from yaml
func ReadYamlTemplate ¶
func ReadYamlTemplate(text string, data interface{}) (*EventCheckerConf, error)
ReadYamlTemplate reads an event checker template from yaml
func (*EventCheckerConf) WriteYaml ¶
func (conf *EventCheckerConf) WriteYaml() (string, error)
WriteYaml writes an event checker to yaml
func (*EventCheckerConf) WriteYamlFile ¶
func (conf *EventCheckerConf) WriteYamlFile(file string) error
WriteYamlFile writes an event checker to a yaml file
type MultiEventCheckerSpec ¶
type MultiEventCheckerSpec struct { Ordered bool `json:"ordered"` Checks []EventChecker `json:"checks"` }
MultiEventCheckerSpec is a YAML spec to define a MultiEventChecker
func SpecFromMultiEventChecker ¶
func SpecFromMultiEventChecker(checker_ eventchecker.MultiEventChecker) (*MultiEventCheckerSpec, error)
SpecFromMultiEventChecker coerces a spec from a MultiEventChecker
func (*MultiEventCheckerSpec) IntoMultiEventChecker ¶
func (spec *MultiEventCheckerSpec) IntoMultiEventChecker() (eventchecker.MultiEventChecker, error)
IntoMultiEventChecker coerces an event checker from this spec