Documentation ¶
Index ¶
- type ApprovalConfig
- type BlockSyncerConfig
- type BucketConfig
- type ChainConfig
- type Customize
- type EndpointConfig
- type ExecutorConfig
- type GCConfig
- type GatewayConfig
- type GfSpConfig
- type LogConfig
- type ManagerConfig
- type MetadataConfig
- type MonitorConfig
- type Option
- func CustomizeConsensus(consensus consensus.Consensus) Option
- func CustomizeGfSpDB(db spdb.SPDB) Option
- func CustomizePieceOp(op piecestore.PieceOp) Option
- func CustomizePieceStore(store piecestore.PieceStore) Option
- func CustomizeRcLimiter(limiter corercmgr.Limiter) Option
- func CustomizeRcmgr(rcmgr corercmgr.ResourceManager) Option
- func CustomizeStrategyTQueue(newFunc coretaskqueue.NewTQueueOnStrategy) Option
- func CustomizeStrategyTQueueWithLimit(newFunc coretaskqueue.NewTQueueOnStrategyWithLimit) Option
- func CustomizeTQueue(newFunc coretaskqueue.NewTQueue) Option
- func CustomizeTQueueWithLimit(newFunc coretaskqueue.NewTQueueWithLimit) Option
- type P2PConfig
- type ParallelConfig
- type RcmgrConfig
- type SpAccountConfig
- type TaskConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApprovalConfig ¶
type BlockSyncerConfig ¶
type BucketConfig ¶
type ChainConfig ¶
type ChainConfig struct { ChainID string `comment:"required"` ChainAddress []string `comment:"required"` SealGasLimit uint64 `comment:"optional"` SealFeeAmount uint64 `comment:"optional"` RejectSealGasLimit uint64 `comment:"optional"` RejectSealFeeAmount uint64 `comment:"optional"` DiscontinueBucketGasLimit uint64 `comment:"optional"` DiscontinueBucketFeeAmount uint64 `comment:"optional"` CreateGlobalVirtualGroupGasLimit uint64 `comment:"optional"` CreateGlobalVirtualGroupFeeAmount uint64 `comment:"optional"` CompleteMigrateBucketGasLimit uint64 `comment:"optional"` CompleteMigrateBucketFeeAmount uint64 `comment:"optional"` }
type Customize ¶
type Customize struct { GfSpDB spdb.SPDB PieceStore piecestore.PieceStore PieceOp piecestore.PieceOp Rcmgr corercmgr.ResourceManager RcLimiter corercmgr.Limiter Consensus consensus.Consensus NewTQueueFunc coretaskqueue.NewTQueue NewTQueueWithLimit coretaskqueue.NewTQueueWithLimit NewStrategyTQueueFunc coretaskqueue.NewTQueueOnStrategy NewStrategyTQueueWithLimitFunc coretaskqueue.NewTQueueOnStrategyWithLimit NewVirtualGroupManagerFunc vgmgr.NewVirtualGroupManager }
Customize defines the interface for developer to customize own implement, the GfSp base app will call the customized implement.
type EndpointConfig ¶
type EndpointConfig struct { ApproverEndpoint string `comment:"required"` ManagerEndpoint string `comment:"required"` DownloaderEndpoint string `comment:"required"` ReceiverEndpoint string `comment:"required"` MetadataEndpoint string `comment:"required"` UploaderEndpoint string `comment:"required"` P2PEndpoint string `comment:"required"` SignerEndpoint string `comment:"required"` AuthenticatorEndpoint string `comment:"required"` }
type ExecutorConfig ¶
type ExecutorConfig struct { MaxExecuteNumber int64 `comment:"optional"` AskTaskInterval int `comment:"optional"` AskReplicateApprovalTimeout int64 `comment:"optional"` AskReplicateApprovalExFactor float64 `comment:"optional"` ListenSealTimeoutHeight int `comment:"optional"` ListenSealRetryTimeout int `comment:"optional"` MaxListenSealRetry int `comment:"optional"` MaxObjectMigrationRetry int `comment:"optional"` ObjectMigrationRetryTimeout int `comment:"optional"` EnableSkipFailedToMigrateObject bool `comment:"optional"` BucketTrafficKeepTimeDay uint64 `comment:"optional"` ReadRecordKeepTimeDay uint64 `comment:"optional"` ReadRecordDeleteLimit uint64 `comment:"optional"` }
type GCConfig ¶ added in v1.2.0
type GCConfig struct { // gc object GCObjectTimeInterval int `comment:"optional"` GCObjectBlockInterval uint64 `comment:"optional"` GCObjectSafeBlockDistance uint64 `comment:"optional"` // gc zombie EnableGCZombie bool `comment:"optional"` GCZombieSafeObjectIDDistance uint64 `comment:"optional"` GCZombiePieceTimeInterval int `comment:"optional"` GCZombiePieceObjectIDInterval uint64 `comment:"optional"` // gc meta EnableGCMeta bool `comment:"optional"` GCMetaTimeInterval int `comment:"optional"` }
type GatewayConfig ¶
type GfSpConfig ¶
type GfSpConfig struct { Env string `comment:"optional"` AppID string `comment:"optional"` Server []string `comment:"optional"` GRPCAddress string `comment:"optional"` Customize *Customize `comment:"optional"` SpDB storeconfig.SQLDBConfig BsDB storeconfig.SQLDBConfig PieceStore storage.PieceStoreConfig Chain ChainConfig SpAccount SpAccountConfig Endpoint EndpointConfig Approval ApprovalConfig Bucket BucketConfig Gateway GatewayConfig Executor ExecutorConfig P2P P2PConfig Parallel ParallelConfig Task TaskConfig Monitor MonitorConfig Rcmgr RcmgrConfig `comment:"optional"` Log LogConfig BlockSyncer BlockSyncerConfig APIRateLimiter mwhttp.RateLimiterConfig Manager ManagerConfig GC GCConfig }
GfSpConfig defines the GfSp configuration.
func (*GfSpConfig) Apply ¶
func (cfg *GfSpConfig) Apply(opts ...Option) error
Apply sets the customized implement to the GfSp configuration, it will be called before init GfSp base app.
func (*GfSpConfig) String ¶
func (cfg *GfSpConfig) String() string
String returns the detail GfSp configuration.
type ManagerConfig ¶
type ManagerConfig struct { EnableLoadTask bool `comment:"optional"` EnableHealthyChecker bool `comment:"optional"` SubscribeSPExitEventIntervalMillisecond uint `comment:"optional"` SubscribeSwapOutExitEventIntervalMillisecond uint `comment:"optional"` SubscribeBucketMigrateEventIntervalMillisecond uint `comment:"optional"` GVGPreferSPList []uint32 `comment:"optional"` SPBlackList []uint32 `comment:"optional"` // EnableTaskRetryScheduler is used to enable task retry scheduler. EnableTaskRetryScheduler bool `comment:"optional"` // RejectUnsealThresholdSecond is as the following meanings: // retry replicate and seal task when the task's create_timestamp + RejectUnsealThresholdSecond > now.time(); // retry reject unseal when the task's create_timestamp + RejectUnsealThresholdSecond <= now.time() && // create_timestamp + 2*RejectUnsealThresholdSecond > now.time(). RejectUnsealThresholdSecond uint64 `comment:"optional"` }
type MetadataConfig ¶
type MonitorConfig ¶
type Option ¶
type Option = func(cfg *GfSpConfig) error
func CustomizeConsensus ¶
func CustomizeGfSpDB ¶
func CustomizePieceOp ¶
func CustomizePieceOp(op piecestore.PieceOp) Option
func CustomizePieceStore ¶
func CustomizePieceStore(store piecestore.PieceStore) Option
func CustomizeRcLimiter ¶
func CustomizeRcmgr ¶
func CustomizeRcmgr(rcmgr corercmgr.ResourceManager) Option
func CustomizeStrategyTQueue ¶
func CustomizeStrategyTQueue(newFunc coretaskqueue.NewTQueueOnStrategy) Option
func CustomizeStrategyTQueueWithLimit ¶
func CustomizeStrategyTQueueWithLimit(newFunc coretaskqueue.NewTQueueOnStrategyWithLimit) Option
func CustomizeTQueue ¶
func CustomizeTQueue(newFunc coretaskqueue.NewTQueue) Option
func CustomizeTQueueWithLimit ¶
func CustomizeTQueueWithLimit(newFunc coretaskqueue.NewTQueueWithLimit) Option
type ParallelConfig ¶
type ParallelConfig struct { GlobalCreateBucketApprovalParallel int `comment:"optional"` GlobalCreateObjectApprovalParallel int `comment:"optional"` // upload + replicate + seal GlobalMaxUploadingParallel int `comment:"optional"` // only upload GlobalUploadObjectParallel int `comment:"optional"` GlobalReplicatePieceParallel int `comment:"optional"` GlobalSealObjectParallel int `comment:"optional"` GlobalReceiveObjectParallel int `comment:"optional"` GlobalRecoveryPieceParallel int `comment:"optional"` GlobalMigrateGVGParallel int `comment:"optional"` GlobalBackupTaskParallel int `comment:"optional"` GlobalDownloadObjectTaskCacheSize int `comment:"optional"` GlobalChallengePieceTaskCacheSize int `comment:"optional"` GlobalSyncConsensusInfoInterval uint64 `comment:"optional"` // gc GlobalGCObjectParallel int `comment:"optional"` GlobalGCBucketMigrationParallel int `comment:"optional"` GlobalGCZombieParallel int `comment:"optional"` GlobalGCMetaParallel int `comment:"optional"` UploadObjectParallelPerNode int `comment:"optional"` ReceivePieceParallelPerNode int `comment:"optional"` DownloadObjectParallelPerNode int `comment:"optional"` ChallengePieceParallelPerNode int `comment:"optional"` AskReplicateApprovalParallelPerNode int `comment:"optional"` QuerySPParallelPerNode int64 `comment:"optional"` DiscontinueBucketEnabled bool `comment:"required"` DiscontinueBucketTimeInterval int `comment:"optional"` DiscontinueBucketKeepAliveDays int `comment:"required"` LoadReplicateTimeout int64 `comment:"optional"` LoadSealTimeout int64 `comment:"optional"` }
type RcmgrConfig ¶
type RcmgrConfig struct { DisableRcmgr bool `comment:"optional"` GfSpLimiter *gfsplimit.GfSpLimiter }
type SpAccountConfig ¶
type SpAccountConfig struct { SpOperatorAddress string `comment:"required"` OperatorPrivateKey string `comment:"required"` FundingPrivateKey string `comment:"required"` SealPrivateKey string `comment:"required"` ApprovalPrivateKey string `comment:"required"` GcPrivateKey string `comment:"required"` BlsPrivateKey string `comment:"required"` }
type TaskConfig ¶
type TaskConfig struct { UploadTaskSpeed int64 `comment:"optional"` DownloadTaskSpeed int64 `comment:"optional"` ReplicateTaskSpeed int64 `comment:"optional"` ReceiveTaskSpeed int64 `comment:"optional"` SealObjectTaskTimeout int64 `comment:"optional"` SealObjectTaskRetry int64 `comment:"optional"` ReplicateTaskRetry int64 `comment:"optional"` ReceiveConfirmTaskRetry int64 `comment:"optional"` // gc GcObjectTaskTimeout int64 `comment:"optional"` GcZombieTaskTimeout int64 `comment:"optional"` GcMetaTaskTimeout int64 `comment:"optional"` GcObjectTaskRetry int64 `comment:"optional"` GcZombieTaskRetry int64 `comment:"optional"` GcMetaTaskRetry int64 `comment:"optional"` }
Click to show internal directories.
Click to hide internal directories.