cmd

package
v0.0.0-...-a1de707 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2015 License: Apache-2.0 Imports: 15 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorBindHttp = errors.New("main_cfg:" +
	" couchbase cfg needs network/IP address for bindHttp,\n" +
	"  Please specify a network/IP address for the -bindHttp parameter\n" +
	"  (non-loopback, non-127.0.0.1/localhost, non-0.0.0.0)\n" +
	"  so that this node can be clustered with other nodes.")

Functions

func DumpOnSignal

func DumpOnSignal(signals ...os.Signal)

func DumpOnSignalForPlatform

func DumpOnSignalForPlatform()

func Failover

func Failover(cfg cbgt.Cfg, version string, server string,
	nodesFailover []string) (bool, error)

Failover promotes replicas to primary for the remaining nodes.

func LogFlags

func LogFlags(flagAliases map[string][]string)

func MainCfg

func MainCfg(baseName, connect, bindHttp,
	register, dataDir string) (cbgt.Cfg, error)

MainCfg connects to a Cfg provider as a server peer (e.g., as a cbgt.Manager).

func MainCfgCB

func MainCfgCB(baseName, urlStr, bindHttp, register, dataDir string) (
	cbgt.Cfg, error)

func MainCfgClient

func MainCfgClient(baseName, cfgConnect string) (cbgt.Cfg, error)

MainCfgClient helper function connects to a Cfg provider as a client (not as a known cbgt.Manager server or peer). This is useful, for example, for tool developers as opposed to server developers.

func MainCfgMetaKv

func MainCfgMetaKv(baseName, urlStr, bindHttp, register, dataDir string) (
	cbgt.Cfg, error)

func MainCfgSimple

func MainCfgSimple(baseName, connect, bindHttp, register, dataDir string) (
	cbgt.Cfg, error)

func MainCommon

func MainCommon(version string, flagAliases map[string][]string)

func MainUUID

func MainUUID(baseName, dataDir string) (string, error)

MainUUID is a helper function for cmd-line tool developers, that reuses a previous "baseName.idd" file from the dataDir if it exists, or generates a brand new UUID (and persists it).

func PlannerSteps

func PlannerSteps(steps map[string]bool,
	cfg cbgt.Cfg, version, server string, nodesToRemove []string,
	dryRun bool) error

PlannerSteps helps command-line tools implement the planner steps: * "unregister" - unregisters nodesToRemove from the cfg. * "planner" - runs the planner to save a new plan into the cfg.

The default steps are "unregister" and "planner".

An additional composite step, "FAILOVER" (fully capitalized), is used to process the nodesToRemove as nodes to be failover'ed. "FAILOVER" is comprised of the lower-level steps of "unregister" and "failover" (all lowercase).

func RegisterIndexTypes

func RegisterIndexTypes(indexTypes []string)

The user may have informed the cmd about application specific index types, which we need to register (albeit with fake, "error-only" implementations) because the cbgt's planner (cbgt.CalcPlan()) has safety checks which skips any unknown, unregistered index types.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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