Documentation
¶
Index ¶
- func Apply(in []ServerOrGroup, ctx Context, out *chihuahua.ServerOrGroup)
- func New() *chihuahua.Config
- func Parse(path string, cfg *chihuahua.Config) error
- func Setup(sourcePath string, watch bool) *chihuahua.Config
- func Watch(sourcePath string, targetStruct *chihuahua.Config) error
- type Check
- type Config
- type Context
- type Empty
- type Notifier
- type NotifierFilter
- type ServerOrGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Apply ¶
func Apply(in []ServerOrGroup, ctx Context, out *chihuahua.ServerOrGroup)
Types ¶
type Check ¶
type Config ¶
type Config struct {
Check []Check `hcl:"check,block"`
Group []ServerOrGroup `hcl:"group,block"`
Server []ServerOrGroup `hcl:"server,block"`
Notifier []Notifier `hcl:"notifier,block"`
RootURL *string `hcl:"root_url"`
Disable *bool `hcl:"disable"`
Notify *[]string `hcl:"notify"`
Verify *uint `hcl:"verify"`
Interval *string `hcl:"interval"`
// contains filtered or unexported fields
}
type Empty ¶
type Empty struct{}
Server and Group exist just to check if there are any invalid fields
type Notifier ¶
type Notifier struct {
ID string `hcl:"id,label"`
Type string `hcl:"type"`
Filters []NotifierFilter `hcl:"filter,block"`
Remain hcl.Body `hcl:",remain"`
}
type NotifierFilter ¶
type ServerOrGroup ¶
type ServerOrGroup struct {
ID string `hcl:"id,label"`
Name *string `hcl:"name"`
Connection *string `hcl:"connection"`
Disable *bool `hcl:"disable"`
Notify *[]string `hcl:"notify"`
Verify *uint `hcl:"verify"`
Interval *string `hcl:"interval"`
Check []Check `hcl:"check,block"`
Group []ServerOrGroup `hcl:"group,block"`
Server []ServerOrGroup `hcl:"server,block"`
Info hcl.Body `hcl:",remain"`
// contains filtered or unexported fields
}
func Merge ¶
func Merge(servers []ServerOrGroup, groups []ServerOrGroup) ([]ServerOrGroup, error)
Click to show internal directories.
Click to hide internal directories.