process

package
v0.8.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2019 License: AGPL-3.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Error is a process error class
	Error = errs.Class("process error")
)

Functions

func Ctx

func Ctx(cmd *cobra.Command) context.Context

Ctx returns the appropriate context.Context for ExecuteWithConfig commands

func Exec

func Exec(cmd *cobra.Command)

Exec runs a Cobra command. If a "config" flag is defined it will be parsed and loaded using viper.

func ExecuteWithConfig

func ExecuteWithConfig(cmd *cobra.Command, defaultConfig string)

ExecuteWithConfig runs a Cobra command with the provided default config

func InitMetrics

func InitMetrics(ctx context.Context, r *monkit.Registry, instanceID string) (err error)

InitMetrics initializes telemetry reporting. Makes a telemetry.Client and calls its Run() method in a goroutine.

func InitMetricsWithCertPath

func InitMetricsWithCertPath(ctx context.Context, r *monkit.Registry, certPath string) error

InitMetricsWithCertPath initializes telemetry reporting, using the node ID corresponding to the given certificate as the telemetry instance ID.

func SaveConfig

func SaveConfig(flagset *pflag.FlagSet, outfile string, overrides map[string]interface{}) error

SaveConfig will save only the user-specific flags with default values to outfile with specific values specified in 'overrides' overridden.

func SaveConfigWithAllDefaults

func SaveConfigWithAllDefaults(flagset *pflag.FlagSet, outfile string, overrides map[string]interface{}) error

SaveConfigWithAllDefaults will save all flags with default values to outfile with specific values specified in 'overrides' overridden.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL