Added framework for alarms, code cleanup
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user