Documentation ¶
Index ¶
- Constants
- Variables
- func Ctx(cmd *cobra.Command) context.Context
- func Exec(cmd *cobra.Command)
- func InitMetrics(ctx context.Context, r *monkit.Registry, instanceID string) (err error)
- func InitMetricsWithCertPath(ctx context.Context, r *monkit.Registry, certPath string) error
- func SaveConfig(flagset *pflag.FlagSet, outfile string, overrides map[string]interface{}) error
- func SaveConfigWithAllDefaults(flagset *pflag.FlagSet, outfile string, overrides map[string]interface{}) error
Constants ¶
View Source
const DefaultCfgFilename = "config.yaml"
DefaultCfgFilename is the default filename used for storing a configuration.
Variables ¶
View Source
var ( // Error is a process error class Error = errs.Class("process error") )
Functions ¶
func Exec ¶
Exec runs a Cobra command. If a "config" flag is defined it will be parsed and loaded using viper.
func InitMetrics ¶
InitMetrics initializes telemetry reporting. Makes a telemetry.Client and calls its Run() method in a goroutine.
func InitMetricsWithCertPath ¶
InitMetricsWithCertPath initializes telemetry reporting, using the node ID corresponding to the given certificate as the telemetry instance ID.
func SaveConfig ¶
SaveConfig will save only the user-specific flags with default values to outfile with specific values specified in 'overrides' overridden.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.