Documentation
¶
Index ¶
- func CreateTopic(name string, brokers []string, config *tls.Config) error
- func DeleteTopic(name string, brokers []string, config *tls.Config) error
- func GetTLSConfig(srvCertPath, keyPath, caPath string) (*tls.Config, error)
- func NewReader(brokers []string, dialer *kafka.Dialer) *kafka.Reader
- func OpenDB(dsn string) (*sql.DB, error)
- type Monitor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Monitor ¶
type Monitor struct { Site *models.Site Context context.Context Cancel context.CancelFunc // contains filtered or unexported fields }
Monitor represents the availability check for each site
func NewMonitor ¶
func (*Monitor) Start ¶
Start starts the monitor for the site in a goroutine. The wait group operand is incremented and the monitoring results are published to a Kafka topic. Monitor periodicity is achieved with a ticker set to the specified interval for the site and will run until the monitor is cancelled when the HealthBee service ends.
Click to show internal directories.
Click to hide internal directories.