f445fab28b
* Updates to config handling - Add functions to load in configs - Standardize location and naming of config files - Configuration over convention style of config file handling for each service * update config handling and correclty handle cli flags being set * generate configs from default if no config is found - renamed pointerdbDB to pointerdb for clarity in config file - set sane default for pkg/overlay boltDB file - set srvPort to default to 8082 to avoid port collision on default setting * linter updates * move boltdb path vars into function * update tests to handle config environment changes * --fix exec test mocks * update tests to use viper instead of flag library * fix typo * add redis-server to services in travis for tests * update examples with new config env function signature * fix tests
25 lines
515 B
Go
25 lines
515 B
Go
// Copyright (C) 2018 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"flag"
|
|
|
|
"github.com/spf13/cobra"
|
|
"github.com/spf13/viper"
|
|
|
|
"storj.io/storj/pkg/process"
|
|
)
|
|
|
|
func main() {
|
|
flag.Set("metrics.interval", "1s")
|
|
process.Must(process.Main(func() (*viper.Viper, error) { return nil, nil }, process.ServiceFunc(run)))
|
|
}
|
|
|
|
func run(ctx context.Context, _ *cobra.Command, _ []string) error {
|
|
// just go to sleep and let the background telemetry start sending
|
|
select {}
|
|
}
|