flags

package
v0.0.0-...-a9c8dba Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DdAgentHost               = "dd-agent-host"
	DdTraceAgentPort          = "dd-trace-agent-port"
	NonValidatingFullNodeFlag = "non-validating-full-node"
	DdErrorTrackingFormat     = "dd-error-tracking-format"

	// Cosmos flags below. These config values can be set as flags or in config.toml.
	GrpcAddress = "grpc.address"
	GrpcEnable  = "grpc.enable"

	// Grpc Streaming
	GrpcStreamingEnabled = "grpc-streaming-enabled"
)

List of CLI flags.

View Source
const (
	DefaultDdAgentHost           = ""
	DefaultDdTraceAgentPort      = 8126
	DefaultNonValidatingFullNode = false
	DefaultDdErrorTrackingFormat = false

	DefaultGrpcStreamingEnabled = false
)

Default values.

Variables

This section is empty.

Functions

func AddFlagsToCmd

func AddFlagsToCmd(cmd *cobra.Command)

AddFlagsToCmd adds flags to app initialization. These flags should be applied to the `start` command of the V4 Cosmos application. E.g. `dydxprotocold start --non-validating-full-node true`.

Types

type Flags

type Flags struct {
	DdAgentHost           string
	DdTraceAgentPort      uint16
	NonValidatingFullNode bool
	DdErrorTrackingFormat bool

	// Existing flags
	GrpcAddress string
	GrpcEnable  bool

	// Grpc Streaming
	GrpcStreamingEnabled bool
}

A struct containing the values of all flags.

func GetFlagValuesFromOptions

func GetFlagValuesFromOptions(
	appOpts servertypes.AppOptions,
) Flags

GetFlagValuesFromOptions gets values from the `AppOptions` struct which contains values from the command-line flags.

func (*Flags) Validate

func (f *Flags) Validate() error

Validate checks that the flags are valid.

Jump to

Keyboard shortcuts

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