storj/examples/metric-sender/main.go

32 lines
511 B
Go
Raw Normal View History

// Copyright (C) 2018 Storj Labs, Inc.
// See LICENSE for copying information.
package main
import (
"flag"
2018-09-28 19:08:44 +01:00
"fmt"
"github.com/spf13/cobra"
"storj.io/storj/pkg/process"
)
func main() {
2018-09-28 19:08:44 +01:00
err := flag.Set("metrics.interval", "1s")
if err != nil {
fmt.Println(err)
}
process.Exec(&cobra.Command{
Use: "metric-sender",
Short: "send metrics",
RunE: run,
})
}
func run(cmd *cobra.Command, args []string) error {
// just go to sleep and let the background telemetry start sending
select {}
}