diff --git a/cmd/import.go b/cmd/import.go index 6fd182f17..07f91f8b6 100644 --- a/cmd/import.go +++ b/cmd/import.go @@ -25,6 +25,7 @@ import ( var Importer *ctl.ImportCommand +// NewImportCommand runs the Pilosa import subcommand for ingesting bulk data func NewImportCommand(stdin io.Reader, stdout, stderr io.Writer) *cobra.Command { Importer = ctl.NewImportCommand(stdin, stdout, stderr) importCmd := &cobra.Command{ diff --git a/cmd/server.go b/cmd/server.go index 5271be1d2..ea10d23c6 100644 --- a/cmd/server.go +++ b/cmd/server.go @@ -24,6 +24,7 @@ import ( "github.com/spf13/cobra" + "github.com/pilosa/pilosa" "github.com/pilosa/pilosa/ctl" "github.com/pilosa/pilosa/server" ) @@ -31,6 +32,7 @@ import ( // Server is global so that tests can control and verify it. var Server *server.Command +// NewServeCmd create a pilosa server and run it with command line flags func NewServeCmd(stdin io.Reader, stdout, stderr io.Writer) *cobra.Command { Server = server.NewCommand(stdin, stdout, stderr) serveCmd := &cobra.Command{ diff --git a/ctl/server.go b/ctl/server.go index 7c246491a..6186443f8 100644 --- a/ctl/server.go +++ b/ctl/server.go @@ -39,4 +39,7 @@ func BuildServerFlags(cmd *cobra.Command, srv *server.Command) { flags.StringVarP(&srv.Config.Cluster.Type, "cluster.type", "", "static", "Determine how the cluster handles membership and state sharing. Choose from [static, http, gossip]") flags.StringVarP(&srv.Config.Cluster.GossipSeed, "cluster.gossip-seed", "", "", "Host with which to seed the gossip membership.") flags.StringVarP(&srv.Config.Cluster.InternalPort, "cluster.internal-port", "", "", "Port to which pilosa should bind for internal state sharing.") + flags.StringVarP(&srv.Config.Metric.Service, "metric.service", "", "nop", "Default URI on which pilosa should listen.") + flags.StringVarP(&srv.Config.Metric.Host, "metric.host", "", "", "Default URI to send metrics.") + flags.DurationVarP((*time.Duration)(&srv.Config.Metric.PollingInterval), "metric.poll-interval", "", time.Minute*0, "Polling interval metrics.") }