prysm: github.com/prysmaticlabs/prysm/shared/cmd Index | Files

package cmd

import "github.com/prysmaticlabs/prysm/shared/cmd"

Package cmd defines the command line flags for the shared utlities.

Index

Package Files

customflags.go defaults.go flags.go helpers.go wrap_flags.go

Variables

var (
    VerbosityFlag = &cli.StringFlag{
        Name:  "verbosity",
        Usage: "Logging verbosity (trace, debug, info=default, warn, error, fatal, panic)",
        Value: "info",
    }

    DataDirFlag = &cli.StringFlag{
        Name:  "datadir",
        Usage: "Data directory for the databases and keystore",
        Value: DefaultDataDir(),
    }

    EnableTracingFlag = &cli.BoolFlag{
        Name:  "enable-tracing",
        Usage: "Enable request tracing.",
    }

    TracingProcessNameFlag = &cli.StringFlag{
        Name:  "tracing-process-name",
        Usage: "The name to apply to tracing tag \"process_name\"",
    }

    TracingEndpointFlag = &cli.StringFlag{
        Name:  "tracing-endpoint",
        Usage: "Tracing endpoint defines where beacon chain traces are exposed to Jaeger.",
        Value: "http://127.0.0.1:14268/api/traces",
    }

    TraceSampleFractionFlag = &cli.Float64Flag{
        Name:  "trace-sample-fraction",
        Usage: "Indicate what fraction of p2p messages are sampled for tracing.",
        Value: 0.20,
    }

    DisableMonitoringFlag = &cli.BoolFlag{
        Name:  "disable-monitoring",
        Usage: "Disable monitoring service.",
    }

    MonitoringPortFlag = &cli.Int64Flag{
        Name:  "monitoring-port",
        Usage: "Port used to listening and respond metrics for prometheus.",
        Value: 8080,
    }

    NoDiscovery = &cli.BoolFlag{
        Name:  "no-discovery",
        Usage: "Enable only local network p2p and do not connect to cloud bootstrap nodes.",
    }

    StaticPeers = &cli.StringSliceFlag{
        Name:  "peer",
        Usage: "Connect with this peer. This flag may be used multiple times.",
    }

    BootstrapNode = &cli.StringFlag{
        Name:  "bootstrap-node",
        Usage: "" /* 131 byte string literal not displayed */,
        Value: "/dns4/prylabs.net/tcp/30001/p2p/16Uiu2HAm7Qwe19vz9WzD2Mxn7fXd1vgHHp4iccuyq7TxwRXoAGfc",
    }

    RelayNode = &cli.StringFlag{
        Name: "relay-node",
        Usage: "The address of relay node. The beacon node will connect to the " +
            "relay node and advertise their address via the relay node to other peers",
        Value: "",
    }

    P2PUDPPort = &cli.IntFlag{
        Name:  "p2p-udp-port",
        Usage: "The port used by discv5.",
        Value: 12000,
    }

    P2PTCPPort = &cli.IntFlag{
        Name:  "p2p-tcp-port",
        Usage: "The port used by libp2p.",
        Value: 13000,
    }

    P2PIP = &cli.StringFlag{
        Name:  "p2p-local-ip",
        Usage: "The local ip address to listen for incoming data.",
        Value: "",
    }

    P2PHost = &cli.StringFlag{
        Name:  "p2p-host-ip",
        Usage: "The IP address advertised by libp2p. This may be used to advertise an external IP.",
        Value: "",
    }

    P2PHostDNS = &cli.StringFlag{
        Name:  "p2p-host-dns",
        Usage: "The DNS address advertised by libp2p. This may be used to advertise an external DNS.",
        Value: "",
    }

    P2PPrivKey = &cli.StringFlag{
        Name:  "p2p-priv-key",
        Usage: "The file containing the private key to use in communications with other peers.",
        Value: "",
    }

    P2PMaxPeers = &cli.Int64Flag{
        Name:  "p2p-max-peers",
        Usage: "The max number of p2p peers to maintain.",
        Value: 30,
    }

    P2PWhitelist = &cli.StringFlag{
        Name: "p2p-whitelist",
        Usage: "The CIDR subnet for whitelisting peer connections. Example: 192.168.0.0/16 " +
            "would whitelist connections to peers on your local network only. The default " +
            "is to accept all connections.",
    }

    P2PEncoding = &cli.StringFlag{
        Name:  "p2p-encoding",
        Usage: "The encoding format of messages sent over the wire. The default is 0, which represents ssz",
        Value: "ssz",
    }

    ForceClearDB = &cli.BoolFlag{
        Name:  "force-clear-db",
        Usage: "Clear any previously stored data at the data directory",
    }

    ClearDB = &cli.BoolFlag{
        Name:  "clear-db",
        Usage: "Prompt for clearing any previously stored data at the data directory",
    }

    LogFormat = &cli.StringFlag{
        Name:  "log-format",
        Usage: "Specify log formatting. Supports: text, json, fluentd.",
        Value: "text",
    }

    MaxGoroutines = &cli.Int64Flag{
        Name:  "max-goroutines",
        Usage: "Specifies the upper limit of goroutines running before a status check fails",
        Value: 5000,
    }

    LogFileName = &cli.StringFlag{
        Name:  "log-file",
        Usage: "Specify log file name, relative or absolute",
    }

    EnableUPnPFlag = &cli.BoolFlag{
        Name:  "enable-upnp",
        Usage: "Enable the service (Beacon chain or Validator) to use UPnP when possible.",
    }

    ConfigFileFlag = &cli.StringFlag{
        Name:  "config-file",
        Usage: "The filepath to a yaml file with flag values",
    }
)

func ConfirmAction Uses

func ConfirmAction(actionText string, deniedText string) (bool, error)

ConfirmAction uses the passed in actionText as the confirmation text displayed in the terminal. The user must enter Y or N to indicate whether they confirm the action detailed in the warning text. Returns a boolean representing the user's answer.

func DefaultDataDir Uses

func DefaultDataDir() string

DefaultDataDir is the default data directory to use for the databases and other persistence requirements.

func WrapFlags Uses

func WrapFlags(flags []cli.Flag) []cli.Flag

WrapFlags so that they can be loaded from alternative sources.

Package cmd imports 11 packages (graph) and is imported by 12 packages. Updated 2020-03-30. Refresh now. Tools for package owners.