Documentation ¶
Index ¶
- Variables
- func DumpOnSignal(signals ...os.Signal)
- func DumpOnSignalForPlatform()
- func Failover(cfg cbgt.Cfg, version string, server string, options map[string]string, ...) (bool, error)
- func LogFlags(flagAliases map[string][]string)
- func MainCfg(baseName, connect, bindHttp, register, dataDir string) (cbgt.Cfg, error)
- func MainCfgCB(baseName, urlStr, bindHttp, register, dataDir string) (cbgt.Cfg, error)
- func MainCfgClient(baseName, cfgConnect string) (cbgt.Cfg, error)
- func MainCfgEx(baseName, connect, bindHttp, register, dataDir, uuid string, ...) (cbgt.Cfg, error)
- func MainCfgMetaKv(baseName, urlStr, bindHttp, register, dataDir, uuid string, ...) (cbgt.Cfg, error)
- func MainCfgSimple(baseName, connect, bindHttp, register, dataDir string) (cbgt.Cfg, error)
- func MainCommon(version string, flagAliases map[string][]string)
- func MainUUID(baseName, dataDir string) (string, error)
- func ParseOptions(optionKVs string, envName string, options map[string]string) map[string]string
- func ParseOptionsBool(options map[string]string, name, suffix string, defaultVal bool) bool
- func PlannerSteps(steps map[string]bool, cfg cbgt.Cfg, version, server string, ...) error
- func RegisterIndexTypes(indexTypes []string)
Constants ¶
This section is empty.
Variables ¶
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 DumpOnSignalForPlatform ¶
func DumpOnSignalForPlatform()
func Failover ¶
func Failover(cfg cbgt.Cfg, version string, server string, options map[string]string, nodesFailover []string) (bool, error)
Failover promotes replicas to primary for the remaining nodes.
func MainCfgClient ¶
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 MainCfgEx ¶
func MainCfgEx(baseName, connect, bindHttp, register, dataDir, uuid string, options map[string]string) (cbgt.Cfg, error)
MainCfgEx connects to a Cfg provider as a server peer (e.g., as a cbgt.Manager), with more options.
func MainCfgMetaKv ¶
func MainCfgSimple ¶
func MainCommon ¶
func MainUUID ¶
MainUUID is a helper function for cmd-line tool developers, that reuses a previous "baseName.uuid" file from the dataDir if it exists, or generates a brand new UUID (and persists it).
func ParseOptions ¶
ParseOptions parses an options string and environment variable. The optionKVs string is a comma-separated string formated as "key=val,key=val,...".
func ParseOptionsBool ¶
ParseOptionsBool parses the options "name-suffix" and then "name" as boolean (strconv.ParseBool), otherwise returns defaultVal.
func PlannerSteps ¶
func PlannerSteps(steps map[string]bool, cfg cbgt.Cfg, version, server string, options map[string]string, nodesRemove []string, dryRun bool, plannerFilter cbgt.PlannerFilter) error
PlannerSteps helps command-line tools implement the planner steps: * "unregister" - unregisters nodesRemove from the cfg. * "planner" - runs the planner to save a new plan into the cfg. * "failover" - a composite step, comprised of "unregister" and "failover_". * "failover_" - processes the nodesRemove as nodes to be failover'ed.
The "NODES-REMOVE-ALL" step overrides the nodesRemove with every known and wanted node. This can have a lot of impact, and was meant to be used for cluster cleanup/purging situations.
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 |
---|---|
A fake or mock metakv server for dev/testing purposes.
|
A fake or mock metakv server for dev/testing purposes. |