Versions in this module Expand all Collapse all v0 v0.0.1 Feb 24, 2019 Changes in this version + var ErrEmptyListenAddress = errors.New("Listen address must not be empty") + var ErrNoPeerName = errors.New("All PeerConfigs must have a Name") + var ErrNoPeerNetwork = errors.New("All PeerConfigs must have a Network") + var ErrServerAlreadyListening = errors.New("Listen() can only be called once") + var ErrServerNotListening = errors.New("Close() must be called after Listen()") + var ErrTooFewPeers = errors.New("One or more Peers must be configured") + type Config struct + DownThreshold uint + MonitorCycle string + PeerTimeout string + Peers []PeerConfig + UpThreshold uint + Webhook string + func LoadConfig(data []byte) (Config, error) + func LoadConfigFile(filename string) (Config, error) + func (c Config) Valid() error + type PeerConfig struct + DownThreshold uint + Name string + Network string + UpThreshold uint + Webhook string + func (pc PeerConfig) Valid() error + type Server struct + func NewServer(log *log.Logger, verbose bool, addr string, c Config) (*Server, error) + func (s *Server) Close() error + func (s *Server) Listen() error