Documentation
¶
Index ¶
- func CheckRules(ctx context.Context, state *State, checkers map[string]checker.Checker, ...)
- func NewHandler(state *State) http.Handler
- func Run(ctx context.Context, addr string, port int) error
- type State
- func (s *State) AddRule(r *rule.WatchRule)
- func (s *State) Load() error
- func (s *State) MarkTriggered(id string)
- func (s *State) RemoveRule(id string) bool
- func (s *State) Rules() []*rule.WatchRule
- func (s *State) Save() error
- func (s *State) StartAllRuleLoops()
- func (s *State) UpdateRule(r *rule.WatchRule)
- func (s *State) WatchingRules() []*rule.WatchRule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckRules ¶
func CheckRules(ctx context.Context, state *State, checkers map[string]checker.Checker, act map[string]action.Action)
CheckRules checks all watching rules once (used by tests).
func NewHandler ¶
Types ¶
type State ¶
type State struct {
// contains filtered or unexported fields
}
func (*State) MarkTriggered ¶
func (*State) RemoveRule ¶
func (*State) StartAllRuleLoops ¶ added in v0.10.0
func (s *State) StartAllRuleLoops()
StartAllRuleLoops starts a polling goroutine for each existing watching rule.
func (*State) UpdateRule ¶
func (*State) WatchingRules ¶
Click to show internal directories.
Click to hide internal directories.