Documentation ¶
Index ¶
Constants ¶
View Source
const ( DebugCommandPrefix = "gfsp-cli-debug-" DefaultMaxSegmentPieceSize = 16 * 1024 * 1024 DefaultRedundantDataChunkNum = 4 DefaultRedundantParityChunkNum = 2 )
View Source
const ( MaxRecoveryTime = 50 MaxRecoveryJob = 1000 FullQueueWaitTime = 5 * time.Second RecoveryJobSyncTime = 30 * time.Second )
View Source
const (
DefaultConfigFile = "./config.toml"
)
View Source
const (
GfSpCliUserName = "gfsp-cli"
)
Variables ¶
View Source
var ChallengePieceCmd = &cli.Command{ Action: CW.challengePieceAction, Name: "challenge.piece", Usage: "Challenge piece integrity hash", Flags: []cli.Flag{ utils.ConfigFileFlag, objectIDFlag, redundancyIdxFlag, segmentIdxFlag, }, Category: queryCommands, Description: `The challenge.piece command send rpc request to downloader, get integrity meta and check the piece checksums.`, }
View Source
var CompleteSPExitCmd = &cli.Command{ Name: "sp.complete.exit", Usage: "Only used in debugging scenarios, online use not allowed. Used for sp complete exits from the Greenfield storage network.", Description: `Using this command, it will send an transaction to Greenfield blockchain to tell this SP is prepared ` + `to complete exit from Greenfield storage network.`, Category: migrateCommands, Action: CW.completeSPExit, Flags: []cli.Flag{ spOperatorAddressFlag, }, }
View Source
var CompleteSwapOutCmd = &cli.Command{ Name: "sp.complete.swapout", Usage: "Only used in debugging scenarios, online use not allowed. Used for swap out from the Greenfield storage network.", Description: `Using this command, it will send an transaction to Greenfield blockchain to tell this SP is prepared ` + `to swap out from Greenfield storage network.`, Category: migrateCommands, Action: CW.completeSwapOut, Flags: []cli.Flag{ spOperatorAddressFlag, swapOutFamilyID, swapOutGVGIDList, }, }
View Source
var ConfigDumpCmd = &cli.Command{
Action: dumpConfigAction,
Name: "config.dump",
Usage: "Dump default configuration to the './config.toml' file for editing",
Category: "CONFIG COMMANDS",
Description: `The config.dump command writes default configuration values to ./config.toml file for editing.`,
}
ConfigDumpCmd is used to dump default config.toml template.
View Source
var DebugCreateBucketApprovalCmd = &cli.Command{ Action: CW.createBucketApproval, Name: "debug.create.bucket.approval", Usage: "Create random CreateBucketApproval and send to approver for debugging and testing", Flags: []cli.Flag{ utils.ConfigFileFlag, }, Category: debugCommands, Description: `The debug.create.bucket.approval command create a random CreateBucketApproval request and send it ` + `to approver for debugging and testing the approver on Dev Env.`, }
View Source
var DebugCreateObjectApprovalCmd = &cli.Command{ Action: CW.createObjectApproval, Name: "debug.create.object.approval", Usage: "Create random CreateObjectApproval and send to approver for debugging and testing", Flags: []cli.Flag{ utils.ConfigFileFlag, }, Category: debugCommands, Description: `The debug.create.object.approval command create a random CreateObjectApproval request and send it ` + `to approver for debugging and testing the approver on Dev Env.`, }
View Source
var DebugPutObjectCmd = &cli.Command{ Action: CW.putObjectAction, Name: "debug.put.object", Usage: "Create random ObjectInfo and send to uploader for debugging and testing uploading primary sp", Flags: []cli.Flag{ utils.ConfigFileFlag, fileFlag, }, Category: debugCommands, Description: `The debug.put.object command create a random ObjectInfo and send it to uploader for debugging and ` + `testing upload primary sp on Dev Env.`, }
View Source
var DebugReplicateApprovalCmd = &cli.Command{ Action: CW.replicatePieceApprovalAction, Name: "debug.replicate.approval", Usage: "Create random ObjectInfo and send to p2p for debugging and testing p2p protocol network", Flags: []cli.Flag{ utils.ConfigFileFlag, numberFlag, }, Category: debugCommands, Description: `The debug.ask.replicate.approval command create a random ObjectInfo and send it to p2p node for ` + `debugging and testing p2p protocol network on Dev Env.`, }
View Source
var GetObjectCmd = &cli.Command{ Action: CW.getObjectAction, Name: "get.object", Usage: "Get object payload data", Flags: []cli.Flag{ utils.ConfigFileFlag, objectIDFlag, }, Category: queryCommands, Description: `The get.object command send rpc request to downloader server to get object payload data.`, }
View Source
var GetSegmentIntegrityCmd = &cli.Command{ Action: CW.getSegmentIntegrityAction, Name: "get.piece.integrity", Usage: "Get piece integrity hash and signature", Flags: []cli.Flag{ utils.ConfigFileFlag, objectIDFlag, }, Category: queryCommands, Description: `The get.segment.integrity command send rpc request to spdb, get integrity hash and signature.`, }
View Source
var ListErrorsCmd = &cli.Command{
Action: listErrorsAction,
Name: "list.errors",
Usage: "List the predefine errors in greenfield storage provider",
Category: queryCommands,
Description: `The list command output the services in greenfield storage provider.`,
}
View Source
var ListModulesCmd = &cli.Command{
Action: listModulesAction,
Name: "list.modules",
Usage: "List the modules in greenfield storage provider",
Category: queryCommands,
Description: `The list command output the services in greenfield storage provider.`,
}
View Source
var P2PCreateKeysCmd = &cli.Command{
Action: p2pCreateKeysAction,
Name: "p2p.create.key",
Usage: "Create Secp256k1 key pairs for encrypting p2p protocol msg and identifying p2p node",
Flags: []cli.Flag{
numberFlag,
},
Category: "P2P COMMANDS",
Description: `The p2p.create.key creates 'n' sets of Secp256k1 key pairs, each key pair contains a private key and ` +
`a node id, the private key is used to encrypt p2p protocol msg, and the node id is use to public to other p2p ` +
`nodes for communication by p2p protocol.`,
}
View Source
var QueryBucketMigrateCmd = &cli.Command{ Action: CW.getBucketMigrateAction, Name: "query.bucket.migrate", Usage: "Query bucket migrate plan and status", Flags: []cli.Flag{ utils.ConfigFileFlag, endpointFlag, }, Category: queryCommands, Description: `The query.bucket.migrate command send rpc request to manager get plan and status.`, }
View Source
var QueryPrimarySPIncomeCmd = &cli.Command{ Action: CW.getPrimarySPIncomeAction, Name: "query.primary.sp.income", Usage: "Query primary sp income details", Flags: []cli.Flag{ utils.ConfigFileFlag, spIDFlag, }, Category: queryCommands, Description: `The query.primary.sp.income command send rpc request to metadata, get the primary sp incomes details for the current timestamp`, }
View Source
var QuerySPExitCmd = &cli.Command{ Action: CW.getSPExitAction, Name: "query.sp.exit", Usage: "Query sp exit swap plan and migrate gvg task status", Flags: []cli.Flag{ utils.ConfigFileFlag, endpointFlag, }, Category: queryCommands, Description: `The query.sp.exit command send rpc request to manager, get sp exit swap plan and migrate gvg task status.`, }
View Source
var QuerySecondarySPIncomeCmd = &cli.Command{ Action: CW.getSecondarySPIncomeAction, Name: "query.secondary.sp.income", Usage: "Query secondary sp income details", Flags: []cli.Flag{ utils.ConfigFileFlag, spIDFlag, }, Category: queryCommands, Description: `The query.secondary.sp.income command send rpc request to metadata, get the secondary sp incomes details for the current timestamp`, }
View Source
var QueryTaskCmd = &cli.Command{ Action: CW.queryTasksAction, Name: "query.task", Usage: "Query running tasks in modules by task sub key", Category: queryCommands, Flags: []cli.Flag{ utils.ConfigFileFlag, endpointFlag, keyFlag, }, Description: `Query running tasks in modules by task sub key, show the tasks that task key contains the inout key detail info`, }
View Source
var RecoverObjectCmd = &cli.Command{ Action: recoverObjectAction, Name: "recover.object", Usage: "Generate recover piece data tasks to recover the object data", Flags: []cli.Flag{ utils.ConfigFileFlag, bucketFlag, objectFlag, objectListFlag, }, Category: recoveryCommands, Description: `The recover.object command is used to recover the object data on the primarySP or the secondary SP.`, }
View Source
var RecoverPieceCmd = &cli.Command{ Action: recoverPieceAction, Name: "recover.piece", Usage: "Generate recover piece data task to recover the object piece", Flags: []cli.Flag{ utils.ConfigFileFlag, bucketFlag, objectFlag, segmentIdxFlag, }, Category: recoveryCommands, Description: `The recover.piece command is used to recover the object piece data on the primarySP or the secondary SP.`, }
View Source
var SPExitCmd = &cli.Command{ Name: "sp.exit", Usage: "Used for sp exits from the Greenfield storage network", Description: `Using this command, it will send an transaction to Greenfield blockchain to tell this SP is prepared ` + `to exit from Greenfield storage network.`, Category: migrateCommands, Action: CW.spExit, Flags: []cli.Flag{ spOperatorAddressFlag, }, }
View Source
var SetQuotaCmd = &cli.Command{ Action: updateFreeQuotaAction, Name: "update.quota", Usage: "Update the free quota of the SP", Flags: []cli.Flag{ utils.ConfigFileFlag, freeQuotaFlag, }, Category: "QUOTA COMMANDS", Description: `The update.quota command is used to update the free quota of the SP on greenfield chain, it will ` + `send a txn to the chain to finish the updating.`, }
Functions ¶
This section is empty.
Types ¶
type CMDWrapper ¶ added in v0.2.5
type CMDWrapper struct {
// contains filtered or unexported fields
}
CMDWrapper defines cmd wrapper.
var CW CMDWrapper
Source Files ¶
Click to show internal directories.
Click to hide internal directories.