command

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DebugCommandPrefix = "gfsp-cli-debug-"
)
View Source
const (
	GfSpCliUserName = "gfsp-cli"
)
View Source
const (
	MaxRecoveryTime = 50
)

Variables

View Source
var ChallengePieceCmd = &cli.Command{
	Action: challengePieceAction,
	Name:   "challenge.piece",
	Usage:  "Challenge piece integrity hash",
	Flags: []cli.Flag{
		utils.ConfigFileFlag,
		objectIDFlag,
		replicateIdxFlag,
		segmentIdxFlag,
	},
	Category: "QUERY COMMANDS",
	Description: `The challenge.piece command send rpc request to downloader 
get integrity meta and check the piece checksums.`,
}
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.`,
}
View Source
var DebugCreateBucketApprovalCmd = &cli.Command{
	Action: createBucketApproval,
	Name:   "debug.create.bucket.approval",
	Usage:  "Create random CreateBucketApproval and send to approver for debugging and testing",
	Flags: []cli.Flag{
		utils.ConfigFileFlag,
	},
	Category: "DEBUG COMMANDS",
	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: createObjectApproval,
	Name:   "debug.create.object.approval",
	Usage:  "Create random CreateObjectApproval and send to approver for debugging and testing",
	Flags: []cli.Flag{
		utils.ConfigFileFlag,
	},
	Category: "DEBUG COMMANDS",
	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: 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: "DEBUG COMMANDS",
	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: 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: "DEBUG COMMANDS",
	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: getObjectAction,
	Name:   "get.object",
	Usage:  "Get object payload data",
	Flags: []cli.Flag{
		utils.ConfigFileFlag,
		objectIDFlag,
	},
	Category: "QUERY COMMANDS",
	Description: `The get.object command send rpc request to downloader 
server to get object payload data`,
}
View Source
var GetSegmentIntegrityCmd = &cli.Command{
	Action: getSegmentIntegrityAction,
	Name:   "get.piece.integrity",
	Usage:  "Get piece integrity hash and signature",
	Flags: []cli.Flag{
		utils.ConfigFileFlag,
		objectIDFlag,
	},
	Category: "QUERY COMMANDS",
	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:    "QUERY COMMANDS",
	Description: `The list command output the services in greenfield storage provider.`,
}
View Source
var ListModularCmd = &cli.Command{
	Action:      listModularAction,
	Name:        "list.modules",
	Usage:       "List the modules in greenfield storage provider",
	Category:    "QUERY COMMANDS",
	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: getBucketMigrateAction,
	Name:   "query.bucket.migrate",
	Usage:  "Query bucket migrate plan and status",
	Flags: []cli.Flag{
		utils.ConfigFileFlag,
	},
	Category: "QUERY COMMANDS",
	Description: `The query.bucket.migrate command send rpc request to manager 
get plan and status.`,
}
View Source
var QuerySPExitCmd = &cli.Command{
	Action: getSPExitAction,
	Name:   "query.sp.exit",
	Usage:  "Query sp exit swap plan and migrate gvg task status",
	Flags: []cli.Flag{
		utils.ConfigFileFlag,
	},
	Category: "QUERY COMMANDS",
	Description: `The query.sp.exit command send rpc request to manager 
get sp exit swap plan and migrate gvg task status.`,
}
View Source
var QueryTaskCmd = &cli.Command{
	Action:   queryTasksAction,
	Name:     "query.task",
	Usage:    "Query running tasks in modules by task sub key",
	Category: "QUERY COMMANDS",
	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,
	},

	Category: "RECOVERY COMMANDS",
	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: "RECOVERY COMMANDS",
	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: "MIGRATE COMMANDS",
	Action:   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

This section is empty.

Jump to

Keyboard shortcuts

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