Added framework for alarms, code cleanup

This commit is contained in:
2021-01-17 09:04:08 -09:00
parent f108090967
commit 2d99960f06
8 changed files with 190 additions and 51 deletions

View File

@ -4,12 +4,12 @@ import (
"fmt"
)
type AlrmCheck interface {
type Check interface {
Parse(string) (bool, error)
Check(int) error
}
func NewCheck(name string, addr string) (AlrmCheck, error) {
func NewCheck(name string, addr string) (Check, error) {
switch name {
case "ping":
return NewCheckPing(addr), nil