Пример #1
0
func main() {
	opts := harness.NewExporterOpts("example_exporter", "0.0.1")
	opts.Init = exampleInit
	opts.Flags = []cli.Flag{ // additional flags if necessary
		cli.BoolFlag{
			Name:  "flagfoo",
			Usage: "indicates foo",
		},
	}
	opts.MetricsPath = "/metrics" // default
	opts.Tick = true              // default
	opts.ResetOnTick = true       // default
	harness.Main(opts)
}
func main() {
	opts := harness.NewExporterOpts("json_exporter", jsonexporter.Version)
	opts.Usage = "[OPTIONS] HTTP_ENDPOINT CONFIG_PATH"
	opts.Init = jsonexporter.Init
	harness.Main(opts)
}