cockroach: github.com/cockroachdb/cockroach/pkg/cli/cliflags Index | Files

package cliflags

import "github.com/cockroachdb/cockroach/pkg/cli/cliflags"

Index

Package Files

flags.go

Variables

var (
    Attrs = FlagInfo{
        Name:        "attrs",
        Description: "" /* 257 byte string literal not displayed */,
    }

    Locality = FlagInfo{
        Name:        "locality",
        Description: "" /* 744 byte string literal not displayed */,
    }

    Background = FlagInfo{
        Name:        "background",
        Description: "" /* 225 byte string literal not displayed */,
    }

    SQLMem = FlagInfo{
        Name:        "max-sql-memory",
        Description: "" /* 316 byte string literal not displayed */,
    }

    SQLAuditLogDirName = FlagInfo{
        Name: "sql-audit-dir",
        Description: `
If non-empty, create a SQL audit log in this drectory.
`,
    }

    SQLTempStorage = FlagInfo{
        Name:        "max-disk-temp-storage",
        Description: "" /* 1137 byte string literal not displayed */,
    }

    Cache = FlagInfo{
        Name:        "cache",
        Description: "" /* 243 byte string literal not displayed */,
    }

    ClientHost = FlagInfo{
        Name:        "host",
        EnvVar:      "COCKROACH_HOST",
        Description: "" /* 316 byte string literal not displayed */,
    }

    ClientPort = FlagInfo{
        Name:        "port",
        Shorthand:   "p",
        EnvVar:      "COCKROACH_PORT",
        Description: `Deprecated. Use --host=<host>:<port>.`,
    }

    Database = FlagInfo{
        Name:        "database",
        Shorthand:   "d",
        EnvVar:      "COCKROACH_DATABASE",
        Description: `The name of the database to connect to.`,
    }

    DumpMode = FlagInfo{
        Name: "dump-mode",
        Description: `
What to dump. "schema" dumps the schema only. "data" dumps the data only.
"both" (default) dumps the schema then the data.`,
    }

    DumpTime = FlagInfo{
        Name: "as-of",
        Description: `
Dumps the data as of the specified timestamp. Formats supported are the same
as the timestamp type.`,
    }

    Execute = FlagInfo{
        Name:        "execute",
        Shorthand:   "e",
        Description: "" /* 367 byte string literal not displayed */,
    }

    Watch = FlagInfo{
        Name:        "watch",
        Description: "" /* 158 byte string literal not displayed */,
    }

    EchoSQL = FlagInfo{
        Name: "echo-sql",
        Description: `
Reveal the SQL statements sent implicitly by the command-line utility.`,
    }

    CliDebugMode = FlagInfo{
        Name:        "debug-sql-cli",
        Description: "" /* 315 byte string literal not displayed */,
    }

    SafeUpdates = FlagInfo{
        Name:        "safe-updates",
        Description: "" /* 292 byte string literal not displayed */,
    }

    Set = FlagInfo{
        Name: "set",
        Description: `
Set a client-side configuration parameter before running the SQL
shell. This flag may be specified multiple times.`,
    }

    TableDisplayFormat = FlagInfo{
        Name:        "format",
        Description: "" /* 209 byte string literal not displayed */,
    }

    ClusterName = FlagInfo{
        Name:        "cluster-name",
        Description: "" /* 431 byte string literal not displayed */,
    }

    DisableClusterNameVerification = FlagInfo{
        Name:        "disable-cluster-name-verification",
        Description: "" /* 424 byte string literal not displayed */,
    }

    Join = FlagInfo{
        Name:        "join",
        Shorthand:   "j",
        Description: "" /* 980 byte string literal not displayed */,
    }

    ListenAddr = FlagInfo{
        Name:        "listen-addr",
        Description: "" /* 843 byte string literal not displayed */,
    }

    ServerHost = FlagInfo{
        Name:        "host",
        Description: `Alias for --listen-addr. Deprecated.`,
    }

    ServerPort = FlagInfo{
        Name:        "port",
        Description: `Alias for --listen-port. Deprecated.`,
    }

    AdvertiseAddr = FlagInfo{
        Name:        "advertise-addr",
        Description: "" /* 670 byte string literal not displayed */,
    }

    SQLAdvertiseAddr = FlagInfo{
        Name:        "advertise-sql-addr",
        Description: "" /* 677 byte string literal not displayed */,
    }

    AdvertiseHost = FlagInfo{
        Name:        "advertise-host",
        Description: `Alias for --advertise-addr. Deprecated.`,
    }

    AdvertisePort = FlagInfo{
        Name:        "advertise-port",
        Description: `Deprecated. Use --advertise-addr=<host>:<port>.`,
    }

    ListenSQLAddr = FlagInfo{
        Name:        "sql-addr",
        Description: "" /* 903 byte string literal not displayed */,
    }

    ListenHTTPAddr = FlagInfo{
        Name:        "http-addr",
        Description: "" /* 284 byte string literal not displayed */,
    }

    LocalityAdvertiseAddr = FlagInfo{
        Name:        "locality-advertise-addr",
        Description: "" /* 371 byte string literal not displayed */,
    }

    ListenHTTPAddrAlias = FlagInfo{
        Name:        "http-host",
        Description: `Alias for --http-addr. Deprecated.`,
    }

    ListenHTTPPort = FlagInfo{
        Name:        "http-port",
        Description: `Deprecated. Use --http-addr=<host>:<port>.`,
    }

    ListeningURLFile = FlagInfo{
        Name: "listening-url-file",
        Description: `
After the CockroachDB node has started up successfully, it will
write its connection URL to the specified file.`,
    }

    PIDFile = FlagInfo{
        Name: "pid-file",
        Description: `
After the CockroachDB node has started up successfully, it will
write its process ID to the specified file.`,
    }

    Socket = FlagInfo{
        Name:        "socket",
        EnvVar:      "COCKROACH_SOCKET",
        Description: "" /* 158 byte string literal not displayed */,
    }

    ClientInsecure = FlagInfo{
        Name:   "insecure",
        EnvVar: "COCKROACH_INSECURE",
        Description: `
Connect to an insecure cluster. This is strongly discouraged for
production usage.`,
    }

    ServerInsecure = FlagInfo{
        Name:        "insecure",
        Description: "" /* 330 byte string literal not displayed */,
    }

    KeySize = FlagInfo{
        Name:        "key-size",
        Description: `Key size in bits for CA/Node/Client certificates.`,
    }

    CertificateLifetime = FlagInfo{
        Name:        "lifetime",
        Description: `Certificate lifetime.`,
    }

    AllowCAKeyReuse = FlagInfo{
        Name:        "allow-ca-key-reuse",
        Description: `Use the CA key if it exists.`,
    }

    OverwriteFiles = FlagInfo{
        Name:        "overwrite",
        Description: `Certificate and key files are overwritten if they exist.`,
    }

    GeneratePKCS8Key = FlagInfo{
        Name:        "also-generate-pkcs8-key",
        Description: `Also write the key in pkcs8 format to <certs-dir>/client.<username>.key.pk8.`,
    }

    Password = FlagInfo{
        Name:        "password",
        Description: `Prompt for the new user's password.`,
    }

    CertsDir = FlagInfo{
        Name:        "certs-dir",
        EnvVar:      "COCKROACH_CERTS_DIR",
        Description: `Path to the directory containing SSL certificates and keys.`,
    }

    ServerCertsDir = FlagInfo{
        Name:        "certs-dir",
        Description: CertsDir.Description,
    }

    CAKey = FlagInfo{
        Name:        "ca-key",
        EnvVar:      "COCKROACH_CA_KEY",
        Description: `Path to the CA key.`,
    }

    MaxOffset = FlagInfo{
        Name:        "max-offset",
        Description: "" /* 493 byte string literal not displayed */,
    }

    Store = FlagInfo{
        Name:        "store",
        Shorthand:   "s",
        Description: "" /* 2395 byte string literal not displayed */,
    }

    Size = FlagInfo{
        Name:        "size",
        Shorthand:   "z",
        Description: "" /* 616 byte string literal not displayed */,
    }

    TempDir = FlagInfo{
        Name:        "temp-dir",
        Description: "" /* 538 byte string literal not displayed */,
    }

    TempEngine = FlagInfo{
        Name: "temp-engine",
        Description: `
Storage engine to use for temporary storage. Options are rocksdb (default), or
experiemental-pebble.
`,
    }

    ExternalIODir = FlagInfo{
        Name:        "external-io-dir",
        Description: "" /* 654 byte string literal not displayed */,
    }

    URL = FlagInfo{
        Name:        "url",
        EnvVar:      "COCKROACH_URL",
        Description: "" /* 163 byte string literal not displayed */,
    }

    User = FlagInfo{
        Name:        "user",
        Shorthand:   "u",
        EnvVar:      "COCKROACH_USER",
        Description: `Database user name.`,
    }

    From = FlagInfo{
        Name:        "from",
        Description: "" /* 229 byte string literal not displayed */,
    }

    To  = FlagInfo{
        Name:        "to",
        Description: "" /* 237 byte string literal not displayed */,
    }

    Values = FlagInfo{
        Name:        "values",
        Description: `Print values along with their associated key.`,
    }

    Sizes = FlagInfo{
        Name:        "sizes",
        Description: `Print key and value sizes along with their associated key.`,
    }

    Replicated = FlagInfo{
        Name:        "replicated",
        Description: "Restrict scan to replicated data.",
    }

    GossipInputFile = FlagInfo{
        Name:      "file",
        Shorthand: "f",
        Description: `
File containing the JSON output from a node's /_status/gossip/ endpoint.
If specified, takes priority over host/port flags.`,
    }

    PrintSystemConfig = FlagInfo{
        Name: "print-system-config",
        Description: `
If specified, print the system config contents. Beware that the output will be
long and not particularly human-readable.`,
    }

    Decommission = FlagInfo{
        Name: "decommission",
        Description: `
If specified, decommissions the node and waits for it to rebalance before
shutting down the node.`,
    }

    Wait = FlagInfo{
        Name:        "wait",
        Description: "" /* 381 byte string literal not displayed */,
    }

    Timeout = FlagInfo{
        Name:        "timeout",
        Description: "" /* 199 byte string literal not displayed */,
    }

    NodeRanges = FlagInfo{
        Name:        "ranges",
        Description: `Show node details for ranges and replicas.`,
    }

    NodeStats = FlagInfo{
        Name:        "stats",
        Description: `Show node disk usage details.`,
    }

    NodeAll = FlagInfo{
        Name: "all", Description: "" /* 136 byte string literal not displayed */,
    }

    NodeDecommission = FlagInfo{
        Name: "decommission", Description: "" /* 148 byte string literal not displayed */,
    }

    SQLFmtLen = FlagInfo{
        Name: "print-width",
        Description: `
The line length where sqlfmt will try to wrap.`,
    }

    SQLFmtSpaces = FlagInfo{
        Name:        "use-spaces",
        Description: `Indent with spaces instead of tabs.`,
    }

    SQLFmtTabWidth = FlagInfo{
        Name:        "tab-width",
        Description: `Number of spaces per indentation level.`,
    }

    SQLFmtNoSimplify = FlagInfo{
        Name:        "no-simplify",
        Description: `Don't simplify output.`,
    }

    SQLFmtAlign = FlagInfo{
        Name:        "align",
        Description: `Align the output.`,
    }

    DemoNodes = FlagInfo{
        Name:        "nodes",
        Description: `How many in-memory nodes to create for the demo.`,
    }

    RunDemoWorkload = FlagInfo{
        Name:        "with-load",
        Description: `Run a demo workload against the pre-loaded database.`,
    }

    DemoNodeLocality = FlagInfo{
        Name:        "demo-locality",
        Description: "" /* 486 byte string literal not displayed */,
    }

    DemoGeoPartitionedReplicas = FlagInfo{
        Name:        "geo-partitioned-replicas",
        Description: "" /* 483 byte string literal not displayed */,
    }

    UseEmptyDatabase = FlagInfo{
        Name: "empty",
        Description: `
Start with an empty database: avoid pre-loading a default dataset in
the demo shell.`,
    }

    LogDir = FlagInfo{
        Name:        "log-dir",
        Description: "" /* 161 byte string literal not displayed */,
    }

    LogDirMaxSize = FlagInfo{
        Name: "log-dir-max-size",
        Description: `
Maximum combined size of all log files.
`,
    }

    LogFileMaxSize = FlagInfo{
        Name: "log-file-max-size",
        Description: `
Maximum size of each log file.
`,
    }

    LogFileVerbosity = FlagInfo{
        Name: "log-file-verbosity",
        Description: `
Minimum verbosity of messages written to the log file.
`,
    }

    WriteSize = FlagInfo{
        Name: "write-size",
        Description: `
Size of blocks to write to storage device.`,
    }

    SyncInterval = FlagInfo{
        Name: "sync-interval",
        Description: `
Number of bytes to write before running fsync.`,
    }

    BenchConcurrency = FlagInfo{
        Name: "concurrency",
        Description: `
Number of workers for benchmarking.`,
    }

    BenchDuration = FlagInfo{
        Name: "duration",
        Description: `
Amount of time to run workers.`,
    }

    BenchServer = FlagInfo{
        Name: "server",
        Description: `
Run as server for network benchmark.`,
    }

    BenchPort = FlagInfo{
        Name: "port",
        Description: `
Port for network benchmark.`,
    }

    BenchAddresses = FlagInfo{
        Name: "addresses",
        Description: `
Addresses for network benchmark.`,
    }
    BenchLatency = FlagInfo{
        Name: "latency",
        Description: `
Latency or throughput mode.`,
    }
)

Attrs and others store the static information for CLI flags.

type FlagInfo Uses

type FlagInfo struct {
    // Name of the flag as used on the command line.
    Name string

    // Shorthand is the short form of the flag (optional).
    Shorthand string

    // EnvVar is the name of the environment variable through which the flag value
    // can be controlled (optional).
    EnvVar string

    // Description of the flag.
    //
    // The text will be automatically re-wrapped. The wrapping can be stopped by
    // embedding the tag "<PRE>": this tag is removed from the text and
    // signals that everything that follows should not be re-wrapped. To start
    // wrapping again, use "</PRE>".
    Description string
}

FlagInfo contains the static information for a CLI flag and helper to format the description.

func (FlagInfo) Usage Uses

func (f FlagInfo) Usage() string

Usage returns a formatted usage string for the flag, including: * line wrapping * indentation * env variable name (if set)

Package cliflags imports 4 packages (graph) and is imported by 10 packages. Updated 2019-09-22. Refresh now. Tools for package owners.