Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var CmdGetAcct = &commander.Command{ UsageLine: "get-acct [options] <key-prefix>", Short: "fetches and displays an accounting config", Long: ` Fetches and displays the accounting configuration for <key-prefix>. The key prefix should be escaped via URL query escaping if it contains non-ascii bytes or spaces. `, Run: runGetAcct, Flag: *flag.CommandLine, }
A CmdGetAcct command displays the acct config for the specified prefix.
var CmdGetPerms = &commander.Command{ UsageLine: "get-perms [options] <key-prefix>", Short: "fetches and displays the permission config", Long: ` Fetches and displays the permission configuration for <key-prefix>. The key prefix should be escaped via URL query escaping if it contains non-ascii bytes or spaces. `, Run: runGetPerms, Flag: *flag.CommandLine, }
A CmdGetPerms command displays the perm config for the specified prefix.
var CmdGetZone = &commander.Command{ UsageLine: "get-zone [options] <key-prefix>", Short: "fetches and displays the zone config", Long: ` Fetches and displays the zone configuration for <key-prefix>. The key prefix should be escaped via URL query escaping if it contains non-ascii bytes or spaces. `, Run: runGetZone, Flag: *flag.CommandLine, }
A CmdGetZone command displays the zone config for the specified prefix.
var CmdInit = &commander.Command{ UsageLine: "init -gossip=host1:port1[,host2:port2...] " + "-certs=<cert-dir> " + "-stores=(ssd=<data-dir>,hdd:7200rpm=<data-dir>,mem=<capacity-in-bytes>)[,...]", Short: "init new Cockroach cluster and start server", Long: ` Initialize a new Cockroach cluster on this node using the first directory specified in the -stores command line flag as the only replica of the first range. For example: cockroach init -gossip=host1:port1,host2:port2 -stores=ssd=/mnt/ssd1,ssd=/mnt/ssd2 If any specified store is already part of a pre-existing cluster, the bootstrap will fail. After bootstrap initialization: ` + cmdStartLongDescription, Run: runInit, Flag: *flag.CommandLine, }
A CmdInit command initializes a new Cockroach cluster.
var CmdLsAccts = &commander.Command{ UsageLine: "ls-accts [options] [key-regexp]", Short: "list all accounting configs by key prefix", Long: ` List accounting configs. If a regular expression is given, the results of the listing are filtered by key prefixes matching the regexp. The key prefix should be escaped via URL query escaping if it contains non-ascii bytes or spaces. `, Run: runLsAccts, Flag: *flag.CommandLine, }
A CmdLsAccts command displays a list of acct configs by prefix.
var CmdLsPerms = &commander.Command{ UsageLine: "ls-perms [options] [key-regexp]", Short: "list all permisison configs by key prefix", Long: ` List permission configs. If a regular expression is given, the results of the listing are filtered by key prefixes matching the regexp. The key prefix should be escaped via URL query escaping if it contains non-ascii bytes or spaces. `, Run: runLsPerms, Flag: *flag.CommandLine, }
A CmdLsPerms command displays a list of perm configs by prefix.
var CmdLsZones = &commander.Command{ UsageLine: "ls-zones [options] [key-regexp]", Short: "list all zone configs by key prefix", Long: ` List zone configs. If a regular expression is given, the results of the listing are filtered by key prefixes matching the regexp. The key prefix should be escaped via URL query escaping if it contains non-ascii bytes or spaces. `, Run: runLsZones, Flag: *flag.CommandLine, }
A CmdLsZones command displays a list of zone configs by prefix.
var CmdRmAcct = &commander.Command{ UsageLine: "rm-acct [options] <key-prefix>", Short: "remove an accounting config by key prefix", Long: ` Remove an existing accounting config by key prefix. No action is taken if no accounting configuration exists for the specified key prefix. Note that this command can affect only a single accounting config with an exactly matching prefix. The key prefix should be escaped via URL query escaping if it contains non-ascii bytes or spaces. `, Run: runRmAcct, Flag: *flag.CommandLine, }
A CmdRmAcct command removes an acct config by prefix.
var CmdRmPerms = &commander.Command{ UsageLine: "rm-perms [options] <key-prefix>", Short: "remove a permission config by key prefix", Long: ` Remove an existing permission config by key prefix. No action is taken if no permission configuration exists for the specified key prefix. Note that this command can affect only a single perm config with an exactly matching prefix. The key prefix should be escaped via URL query escaping if it contains non-ascii bytes or spaces. `, Run: runRmPerms, Flag: *flag.CommandLine, }
A CmdRmPerms command removes a perm config by prefix.
var CmdRmZone = &commander.Command{ UsageLine: "rm-zone [options] <key-prefix>", Short: "remove a zone config by key prefix", Long: ` Remove an existing zone config by key prefix. No action is taken if no zone configuration exists for the specified key prefix. Note that this command can affect only a single zone config with an exactly matching prefix. The key prefix should be escaped via URL query escaping if it contains non-ascii bytes or spaces. `, Run: runRmZone, Flag: *flag.CommandLine, }
A CmdRmZone command removes a zone config by prefix.
var CmdSetAcct = &commander.Command{ UsageLine: "set-acct [options] <key-prefix> <acct-config-file>", Short: "create or update an accounting config for key prefix", Long: ` Create or update a accounting config for the specified key prefix (first argument: <key-prefix>) to the contents of the specified file (second argument: <acct-config-file>). The key prefix should be escaped via URL query escaping if it contains non-ascii bytes or spaces. The accounting config format has the following YAML schema: cluster_id: cluster For example: cluster_id: test `, Run: runSetAcct, Flag: *flag.CommandLine, }
A CmdSetAcct command creates a new or updates an existing acct config.
var CmdSetPerms = &commander.Command{ UsageLine: "set-perm [options] <key-prefix> <perm-config-file>", Short: "create or update permission config for key prefix", Long: ` Create or update a perm config for the specified key prefix (first argument: <key-prefix>) to the contents of the specified file (second argument: <perm-config-file>). The key prefix should be escaped via URL query escaping if it contains non-ascii bytes or spaces. The permission config format has the following YAML schema: read: - user1 - user2 - ... write: - user1 - user2 - ... For example: read: - readOnlyUser - readWriteUser write: - readWriteUser - WriteOnlyUser Setting permission configs will guarantee that users will have permissions for this key prefix and all sub prefixes of the one that is set `, Run: runSetPerms, Flag: *flag.CommandLine, }
A CmdSetPerms command creates a new or updates an existing perm config.
var CmdSetZone = &commander.Command{ UsageLine: "set-zone [options] <key-prefix> <zone-config-file>", Short: "create or update zone config for key prefix", Long: ` Create or update a zone config for the specified key prefix (first argument: <key-prefix>) to the contents of the specified file (second argument: <zone-config-file>). The key prefix should be escaped via URL query escaping if it contains non-ascii bytes or spaces. The zone config format has the following YAML schema: replicas: - [comma-separated attribute list] - ... range_min_bytes: <size-in-bytes> range_max_bytes: <size-in-bytes> For example: replicas: - [us-east-1a, ssd] - [us-east-1b, ssd] - [us-west-1b, ssd] range_min_bytes: 8388608 range_min_bytes: 67108864 Setting zone configs will guarantee that key ranges will be split such that no key range straddles two zone config specifications. This feature can be taken advantage of to pre-split ranges. `, Run: runSetZone, Flag: *flag.CommandLine, }
A CmdSetZone command creates a new or updates an existing zone config.
var CmdStart = &commander.Command{ UsageLine: "start -gossip=host1:port1[,host2:port2...] " + "-certs=<cert-dir> " + "-stores=(ssd=<data-dir>,hdd:7200rpm=<data-dir>|mem=<capacity-in-bytes>)[,...]", Short: "start node by joining the gossip network", Long: cmdStartLongDescription, Run: runStart, Flag: *flag.CommandLine, }
A CmdStart command starts nodes by joining the gossip network.
var Context = server.NewContext()
Context is the CLI contexted used for the server.
Functions ¶
Types ¶
This section is empty.