func NewMonitor(status HostStatus, ping PingFunc, notifyCh chan<- HostStatus) *Monitor {
	h := Monitor{
		ping:     ping,
		host:     status.Host,
		down:     status.Down,
		notifyCh: notifyCh,
		running:  &sync.Mutex{},
		lock:     &sync.Mutex{},
	}
	return &h
}
NewMonitor takes a host, an initial state, and the notification channels and returns a monitorable host structure
package pingd
import (
	"sync"
	"time"
)
type PingFunc func(host string) (up bool, err error)
type Monitor struct {
	running   *sync.Mutex  
	lock      *sync.Mutex  
	ping      PingFunc
	host      string
	down      bool
	failures  int
	failLimit int
	interval  time.Duration
	stop      bool
	notifyCh  chan<- HostStatus
}