You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
heartbeet/main.go

24 lines
411 B
Go

package main
import (
"flag"
"git.dcpri.me/some-fancy-tools/heartbeet/poller"
)
var (
period poller.PeriodValue
argument string
)
func init() {
// Add and parse flags passed to script
flag.Var(&period, "period", "Period to send metric at")
flag.StringVar(&argument, "argument", "STATE_CODE", "Argument Variable name")
flag.Parse()
}
func main() {
poller.StartTicker(period.Duration, argument)
}