module

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: GPL-3.0 Imports: 16 Imported by: 0

README

Module

The Module is a self-contained logical component of SP, with necessary interactions between modules handled by the GfSp framework. The implementation of the module can be customized as needed. For instance, while the GfSp framework requires object approval before uploading, SP can customize whether to agree with the approval.

Concept

Front Modules

The Front Modules are responsible for handling user requests. The Gater generates corresponding tasks and sends them to the Front Modules. The Front Modules verify the correctness of the request and perform additional tasks after handling the request. To accomplish this, the Front Modules have three interfaces for each task type: PreHandleXXXTask, HandleXXXTask and PostHandleXXXTask. The Front Modules consist of Approver, Downloader and Uploader.

Background Modules

The Background Modules are responsible for handling internal tasks of SP, which are generated internally and thus have guaranteed information correctness. As a result, there is only one interface HandleXXXTask for these tasks. The Background Modules consist of Authenticator, TaskExecutor, Manager, P2P, Receiver and Signer.

Module Type

The GfSp framework comprises several modules, including Gater, Approver, Authenticator, Uploader, Downloader, Manager, P2P, TaskExecutor, Receiver, Signer, Metadata and BlockSyncer. Additionally, the GfSp framework supports the extension of customized modules as required. Once registered in the GfSp framework and executing the modular interface, these customized modules will be initialized and scheduled.

Gater

Gater module serves as the gateway for SP, providing HTTP services and adhering to the S3 protocol. It generates tasks corresponding to user requests and forwards them to other modules within SP. Since Gater does not allow customization, no interface is defined in the modular file.

Authenticator

Authenticator module is responsible for verifying authentication.

Approver

Approver module is responsible for handling approval requests, specifically CreateBucketApproval and CreateObjectApproval.

Uploader

Uploader module handles the put object requests from user accounts and stores payload data into piece store of the primary SP.

Downloader

Downloader module is responsible for handling get object request from user account and get challenge info request from other components in the Greenfield system.

TaskExecutor

TaskExecutor module is responsible for handling background task. This module can request tasks from the Manager module, execute them and report the results or status back to the Manager. The tasks it can handle include ReplicatePieceTask, SealObjectTask, ReceivePieceTask, GCObjectTask, GCZombiePieceTask, and GCMetaTask.

Manager

Manager module is responsible for managing task scheduling of SP and other management functions.

P2P

P2P module is responsible for handling the interaction of control information between SPs. It handles ask replicate piece approval requests by broadcasting the approval to other SPs, waiting for responses and returning the approvals if the minimum or maximum approved number is reached before the timeout.

Receiver

Receiver module receives data from the primary SP, calculates the integrity hash of the data, signs it, and returns it to the primary SP for sealing on a greenfield.

Signer

Signer module handles the signing of the SP data on the Greenfield chain operator and holds all of the SP's private keys. Due to the sequence number of the SP account, it must be a singleton.

Documentation

Overview

Package module is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var (
	ApprovalModularName              = strings.ToLower("Approver")
	ApprovalModularDescription       = "Handles the ask crate bucket/object and replicates piece approval request."
	AuthenticationModularName        = strings.ToLower("Authenticator")
	AuthenticationModularDescription = "Checks authentication."
	DownloadModularName              = strings.ToLower("Downloader")
	DownloadModularDescription       = "Downloads object and gets challenge info and statistical read traffic from the backend."
	ExecuteModularName               = strings.ToLower("TaskExecutor")
	ExecuteModularDescription        = "Executes background tasks."
	GateModularName                  = strings.ToLower("Gateway")
	GateModularDescription           = "Receives the user request and routes to the responding service."
	ManageModularName                = strings.ToLower("Manager")
	ManageModularDescription         = "Manages SPs and schedules tasks."
	P2PModularName                   = strings.ToLower("p2p")
	P2PModularDescription            = "Communicates between SPs on p2p protocol."
	ReceiveModularName               = strings.ToLower("Receiver")
	ReceiveModularDescription        = "Receives data pieces of an object from other storage provider and store."
	SignModularName                  = strings.ToLower("Signer")
	SignModularDescription           = "Signs the transaction and broadcasts to chain."
	UploadModularName                = strings.ToLower("Uploader")
	UploadModularDescription         = "Uploads object payload to primary SP."
	BlockSyncerModularName           = strings.ToLower("BlockSyncer")
	BlockSyncerModularDescription    = "Synchronize data on the chain to SP"
	MetadataModularName              = strings.ToLower("Metadata")
	MetadataModularDescription       = "Retrieves sp metadata and info."
)
View Source
var (
	ErrNilModular = errors.New("call nil module, please check again")
)

Functions

This section is empty.

Types

type Approver

type Approver interface {
	Modular
	// PreCreateBucketApproval prepares to handle CreateBucketApproval, it can do some
	// checks such as checking for duplicates, if limitation of SP has been reached, etc.
	PreCreateBucketApproval(ctx context.Context, task task.ApprovalCreateBucketTask) error
	// HandleCreateBucketApprovalTask handles the CreateBucketApproval, it can set expired height, sign the MsgCreateBucket and so on.
	HandleCreateBucketApprovalTask(ctx context.Context, task task.ApprovalCreateBucketTask) (bool, error)
	// PostCreateBucketApproval is called after HandleCreateBucketApprovalTask, it can recycle resources, make statistics
	// and do some other operations.
	PostCreateBucketApproval(ctx context.Context, task task.ApprovalCreateBucketTask)

	// PreMigrateBucketApproval prepares to handle MigrateBucketApproval, it can do some
	// checks such as checking for duplicates, if limitation of SP has been reached, etc.
	PreMigrateBucketApproval(ctx context.Context, task task.ApprovalMigrateBucketTask) error
	// HandleMigrateBucketApprovalTask handles the MigrateBucketApproval, it can set expired height, sign the MsgMigrateBucket and so on.
	HandleMigrateBucketApprovalTask(ctx context.Context, task task.ApprovalMigrateBucketTask) (bool, error)
	// PostMigrateBucketApproval is called after HandleMigrateBucketApprovalTask, it can recycle resources, make statistics
	// and do some other operations.
	PostMigrateBucketApproval(ctx context.Context, task task.ApprovalMigrateBucketTask)

	// PreCreateObjectApproval prepares to handle CreateObjectApproval, it can do some
	// checks such as check for duplicates, if limitation of SP has been reached, etc.
	PreCreateObjectApproval(ctx context.Context, task task.ApprovalCreateObjectTask) error
	// HandleCreateObjectApprovalTask handles the CreateObjectApproval, it can set expired height, sign the MsgCreateObject and so on.
	HandleCreateObjectApprovalTask(ctx context.Context, task task.ApprovalCreateObjectTask) (bool, error)
	// PostCreateObjectApproval is called after HandleCreateObjectApprovalTask, it can
	// recycle resources, make statistics and do some other operations.
	PostCreateObjectApproval(ctx context.Context, task task.ApprovalCreateObjectTask)
	// QueryTasks queries tasks that running on approver by task sub-key.
	QueryTasks(ctx context.Context, subKey task.TKey) ([]task.Task, error)
}

Approver is an abstract interface to handle asking approval requests.

type AuthOpType

type AuthOpType int32

AuthOpType defines the operator type used to authentication verification.

const (
	// AuthOpTypeUnKnown defines the default value of AuthOpType
	AuthOpTypeUnKnown AuthOpType = iota
	// AuthOpAskCreateBucketApproval defines the AskCreateBucketApproval operator
	AuthOpAskCreateBucketApproval
	// AuthOpAskMigrateBucketApproval defines the AskMigrateBucketApproval operator
	AuthOpAskMigrateBucketApproval
	// AuthOpAskCreateObjectApproval defines the AskCreateObjectApproval operator
	AuthOpAskCreateObjectApproval
	// AuthOpTypeGetChallengePieceInfo defines the GetChallengePieceInfo operator
	AuthOpTypeGetChallengePieceInfo
	// AuthOpTypePutObject defines the PutObject operator
	AuthOpTypePutObject
	// AuthOpTypeGetObject defines the GetObject operator
	AuthOpTypeGetObject
	// AuthOpTypeGetUploadingState defines the GetUploadingState operator
	AuthOpTypeGetUploadingState
	// AuthOpTypeGetBucketQuota defines the GetBucketQuota operator
	AuthOpTypeGetBucketQuota
	// AuthOpTypeListBucketReadRecord defines the ListBucketReadRecord operator
	AuthOpTypeListBucketReadRecord
	// AuthOpTypeGetRecoveryPiece defines the GetRecoveryPiece operator
	AuthOpTypeGetRecoveryPiece
)

type Authenticator

type Authenticator interface {
	Modular
	// VerifyAuthentication verifies the operator authentication.
	VerifyAuthentication(ctx context.Context, auth AuthOpType, account, bucket, object string) (bool, error)
	// GetAuthNonce get the auth nonce for which the dApp or client can generate EDDSA key pairs.
	GetAuthNonce(ctx context.Context, account string, domain string) (*spdb.OffChainAuthKey, error)
	// UpdateUserPublicKey updates the user public key once the dApp or client generates the EDDSA key pairs.
	UpdateUserPublicKey(ctx context.Context, account string, domain string, currentNonce int32, nonce int32,
		userPublicKey string, expiryDate int64) (bool, error)
	// VerifyGNFD1EddsaSignature verifies the signature signed by user's EDDSA private key.
	VerifyGNFD1EddsaSignature(ctx context.Context, account string, domain string, offChainSig string, realMsgToSign []byte) (bool, error)
}

Authenticator is an abstract interface to verify users authentication.

type Downloader

type Downloader interface {
	Modular
	// PreDownloadObject prepares to handle DownloadObject, it can do some checks
	// such as checking for duplicates, if limitation of SP has been reached, etc.
	PreDownloadObject(ctx context.Context, task task.DownloadObjectTask) error
	// HandleDownloadObjectTask handles the DownloadObject and get data from piece store.
	HandleDownloadObjectTask(ctx context.Context, task task.DownloadObjectTask) ([]byte, error)
	// PostDownloadObject is called after HandleDownloadObjectTask, it can recycle
	// resources, make statistics and do some other operations..
	PostDownloadObject(ctx context.Context, task task.DownloadObjectTask)

	// PreDownloadPiece prepares to handle DownloadPiece, it can do some checks such as check for duplicates,
	// if limitation of SP has been reached, etc.
	PreDownloadPiece(ctx context.Context, task task.DownloadPieceTask) error
	// HandleDownloadPieceTask handles the DownloadPiece and get data from piece store.
	HandleDownloadPieceTask(ctx context.Context, task task.DownloadPieceTask) ([]byte, error)
	// PostDownloadPiece is called after HandleDownloadPieceTask, it can recycle
	// resources, make statistics and do some other operations.
	PostDownloadPiece(ctx context.Context, task task.DownloadPieceTask)
	// PreChallengePiece prepares to handle ChallengePiece, it can do some checks
	// such as checking for duplicates, if limitation of SP has been reached, etc.
	PreChallengePiece(ctx context.Context, task task.ChallengePieceTask) error
	// HandleChallengePiece handles ChallengePiece, get piece data from piece store and get integrity hash from db.
	HandleChallengePiece(ctx context.Context, task task.ChallengePieceTask) ([]byte, [][]byte, []byte, error)
	// PostChallengePiece is called after HandleChallengePiece, it can recycle resources, make statistics
	// and do some other operations.
	PostChallengePiece(ctx context.Context, task task.ChallengePieceTask)
	// QueryTasks queries download/challenge tasks that running on downloader by task sub-key.
	QueryTasks(ctx context.Context, subKey task.TKey) ([]task.Task, error)
}

Downloader is an abstract interface to handle getting object requests from users' account, and getting challenge info requests from other components in the system.

type Manager

type Manager interface {
	Modular
	// DispatchTask dispatches the task to TaskExecutor module when it asks tasks.
	// It will consider task remaining resources when dispatching task.
	DispatchTask(ctx context.Context, limit rcmgr.Limit) (task.Task, error)
	// QueryTasks queries tasks that hold on manager by task sub-key.
	QueryTasks(ctx context.Context, subKey task.TKey) ([]task.Task, error)
	// QueryBucketMigrate queries tasks that hold on manager by task sub-key.
	QueryBucketMigrate(ctx context.Context) (*gfspserver.GfSpQueryBucketMigrateResponse, error)
	// QuerySpExit queries tasks that hold on manager by task sub-key.
	QuerySpExit(ctx context.Context) (*gfspserver.GfSpQuerySpExitResponse, error)
	// HandleCreateUploadObjectTask handles the CreateUploadObject request from Uploader, before Uploader handles
	// the users' UploadObject requests, it should send CreateUploadObject requests to Manager ask if it's ok.
	// Through this interface SP implements the global uploading object strategy.
	// For example: control the concurrency of global uploads, avoid repeated uploads, rate control, etc.
	HandleCreateUploadObjectTask(ctx context.Context, task task.UploadObjectTask) error
	// HandleDoneUploadObjectTask handles the result of uploading object payload data to primary, Manager should
	// generate ReplicatePieceTask for TaskExecutor to run.
	HandleDoneUploadObjectTask(ctx context.Context, task task.UploadObjectTask) error
	// HandleCreateResumableUploadObjectTask handles the CreateUploadObject request from
	// Uploader, before Uploader handles the user's UploadObject request, it should
	// send CreateUploadObject request to Manager ask if it's ok. Through this
	// interface that SP implements the global upload object strategy.
	HandleCreateResumableUploadObjectTask(ctx context.Context, task task.ResumableUploadObjectTask) error
	// HandleDoneResumableUploadObjectTask handles the result of resumable uploading object payload data to primary,
	// Manager should generate ReplicatePieceTask for TaskExecutor to run.
	HandleDoneResumableUploadObjectTask(ctx context.Context, task task.ResumableUploadObjectTask) error
	// HandleReplicatePieceTask handles the result of replicating piece data to secondary SPs,
	// the request comes from TaskExecutor.
	HandleReplicatePieceTask(ctx context.Context, task task.ReplicatePieceTask) error
	// HandleSealObjectTask handles the result of sealing object to the greenfield the request comes from TaskExecutor.
	HandleSealObjectTask(ctx context.Context, task task.SealObjectTask) error
	// HandleReceivePieceTask handles the result of receiving piece task, the request comes from Receiver that
	// reports have completed ReceivePieceTask to manager and TaskExecutor that the result of confirming whether
	// the object that is synced to secondary SP has been sealed.
	HandleReceivePieceTask(ctx context.Context, task task.ReceivePieceTask) error
	// HandleGCObjectTask handles GCObjectTask, the request comes from TaskExecutor.
	HandleGCObjectTask(ctx context.Context, task task.GCObjectTask) error
	// HandleGCZombiePieceTask handles GCZombiePieceTask, the request comes from TaskExecutor.
	HandleGCZombiePieceTask(ctx context.Context, task task.GCZombiePieceTask) error
	// HandleGCMetaTask handles GCMetaTask, the request comes from TaskExecutor.
	HandleGCMetaTask(ctx context.Context, task task.GCMetaTask) error
	// HandleDownloadObjectTask handles DownloadObjectTask, the request comes from Downloader.
	HandleDownloadObjectTask(ctx context.Context, task task.DownloadObjectTask) error
	// HandleChallengePieceTask handles ChallengePieceTask, the request comes from Downloader.
	HandleChallengePieceTask(ctx context.Context, task task.ChallengePieceTask) error
	// PickVirtualGroupFamily is used to pick vgf for the new bucket.
	PickVirtualGroupFamily(ctx context.Context, task task.ApprovalCreateBucketTask) (uint32, error)
	// HandleRecoverPieceTask handles the result of recovering piece task, the request comes from TaskExecutor.
	HandleRecoverPieceTask(ctx context.Context, task task.RecoveryPieceTask) error
	// NotifyMigrateSwapOut is used to notify dest sp migrate swap out.
	NotifyMigrateSwapOut(ctx context.Context, swapOut *virtualgrouptypes.MsgSwapOut) error
	// HandleMigrateGVGTask handles MigrateGVGTask, the request from TaskExecutor.
	HandleMigrateGVGTask(ctx context.Context, task task.MigrateGVGTask) error
	// QueryTasksStats queries tasks stats from Manager server
	QueryTasksStats(ctx context.Context) (int, int, int, int, int, int)
}

Manager is an abstract interface to do some internal service management, it is responsible for task scheduling and other management of SP.

type MockApprover added in v0.2.4

type MockApprover struct {
	// contains filtered or unexported fields
}

MockApprover is a mock of Approver interface.

func NewMockApprover added in v0.2.4

func NewMockApprover(ctrl *gomock.Controller) *MockApprover

NewMockApprover creates a new mock instance.

func (*MockApprover) EXPECT added in v0.2.4

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockApprover) HandleCreateBucketApprovalTask added in v0.2.4

func (m *MockApprover) HandleCreateBucketApprovalTask(ctx context.Context, task task.ApprovalCreateBucketTask) (bool, error)

HandleCreateBucketApprovalTask mocks base method.

func (*MockApprover) HandleCreateObjectApprovalTask added in v0.2.4

func (m *MockApprover) HandleCreateObjectApprovalTask(ctx context.Context, task task.ApprovalCreateObjectTask) (bool, error)

HandleCreateObjectApprovalTask mocks base method.

func (*MockApprover) HandleMigrateBucketApprovalTask added in v0.2.4

func (m *MockApprover) HandleMigrateBucketApprovalTask(ctx context.Context, task task.ApprovalMigrateBucketTask) (bool, error)

HandleMigrateBucketApprovalTask mocks base method.

func (*MockApprover) Name added in v0.2.4

func (m *MockApprover) Name() string

Name mocks base method.

func (*MockApprover) PostCreateBucketApproval added in v0.2.4

func (m *MockApprover) PostCreateBucketApproval(ctx context.Context, task task.ApprovalCreateBucketTask)

PostCreateBucketApproval mocks base method.

func (*MockApprover) PostCreateObjectApproval added in v0.2.4

func (m *MockApprover) PostCreateObjectApproval(ctx context.Context, task task.ApprovalCreateObjectTask)

PostCreateObjectApproval mocks base method.

func (*MockApprover) PostMigrateBucketApproval added in v0.2.4

func (m *MockApprover) PostMigrateBucketApproval(ctx context.Context, task task.ApprovalMigrateBucketTask)

PostMigrateBucketApproval mocks base method.

func (*MockApprover) PreCreateBucketApproval added in v0.2.4

func (m *MockApprover) PreCreateBucketApproval(ctx context.Context, task task.ApprovalCreateBucketTask) error

PreCreateBucketApproval mocks base method.

func (*MockApprover) PreCreateObjectApproval added in v0.2.4

func (m *MockApprover) PreCreateObjectApproval(ctx context.Context, task task.ApprovalCreateObjectTask) error

PreCreateObjectApproval mocks base method.

func (*MockApprover) PreMigrateBucketApproval added in v0.2.4

func (m *MockApprover) PreMigrateBucketApproval(ctx context.Context, task task.ApprovalMigrateBucketTask) error

PreMigrateBucketApproval mocks base method.

func (*MockApprover) QueryTasks added in v0.2.4

func (m *MockApprover) QueryTasks(ctx context.Context, subKey task.TKey) ([]task.Task, error)

QueryTasks mocks base method.

func (*MockApprover) ReleaseResource added in v0.2.4

func (m *MockApprover) ReleaseResource(ctx context.Context, scope rcmgr.ResourceScopeSpan)

ReleaseResource mocks base method.

func (*MockApprover) ReserveResource added in v0.2.4

func (m *MockApprover) ReserveResource(ctx context.Context, state *rcmgr.ScopeStat) (rcmgr.ResourceScopeSpan, error)

ReserveResource mocks base method.

func (*MockApprover) Start added in v0.2.4

func (m *MockApprover) Start(ctx context.Context) error

Start mocks base method.

func (*MockApprover) Stop added in v0.2.4

func (m *MockApprover) Stop(ctx context.Context) error

Stop mocks base method.

type MockApproverMockRecorder added in v0.2.4

type MockApproverMockRecorder struct {
	// contains filtered or unexported fields
}

MockApproverMockRecorder is the mock recorder for MockApprover.

func (*MockApproverMockRecorder) HandleCreateBucketApprovalTask added in v0.2.4

func (mr *MockApproverMockRecorder) HandleCreateBucketApprovalTask(ctx, task interface{}) *gomock.Call

HandleCreateBucketApprovalTask indicates an expected call of HandleCreateBucketApprovalTask.

func (*MockApproverMockRecorder) HandleCreateObjectApprovalTask added in v0.2.4

func (mr *MockApproverMockRecorder) HandleCreateObjectApprovalTask(ctx, task interface{}) *gomock.Call

HandleCreateObjectApprovalTask indicates an expected call of HandleCreateObjectApprovalTask.

func (*MockApproverMockRecorder) HandleMigrateBucketApprovalTask added in v0.2.4

func (mr *MockApproverMockRecorder) HandleMigrateBucketApprovalTask(ctx, task interface{}) *gomock.Call

HandleMigrateBucketApprovalTask indicates an expected call of HandleMigrateBucketApprovalTask.

func (*MockApproverMockRecorder) Name added in v0.2.4

func (mr *MockApproverMockRecorder) Name() *gomock.Call

Name indicates an expected call of Name.

func (*MockApproverMockRecorder) PostCreateBucketApproval added in v0.2.4

func (mr *MockApproverMockRecorder) PostCreateBucketApproval(ctx, task interface{}) *gomock.Call

PostCreateBucketApproval indicates an expected call of PostCreateBucketApproval.

func (*MockApproverMockRecorder) PostCreateObjectApproval added in v0.2.4

func (mr *MockApproverMockRecorder) PostCreateObjectApproval(ctx, task interface{}) *gomock.Call

PostCreateObjectApproval indicates an expected call of PostCreateObjectApproval.

func (*MockApproverMockRecorder) PostMigrateBucketApproval added in v0.2.4

func (mr *MockApproverMockRecorder) PostMigrateBucketApproval(ctx, task interface{}) *gomock.Call

PostMigrateBucketApproval indicates an expected call of PostMigrateBucketApproval.

func (*MockApproverMockRecorder) PreCreateBucketApproval added in v0.2.4

func (mr *MockApproverMockRecorder) PreCreateBucketApproval(ctx, task interface{}) *gomock.Call

PreCreateBucketApproval indicates an expected call of PreCreateBucketApproval.

func (*MockApproverMockRecorder) PreCreateObjectApproval added in v0.2.4

func (mr *MockApproverMockRecorder) PreCreateObjectApproval(ctx, task interface{}) *gomock.Call

PreCreateObjectApproval indicates an expected call of PreCreateObjectApproval.

func (*MockApproverMockRecorder) PreMigrateBucketApproval added in v0.2.4

func (mr *MockApproverMockRecorder) PreMigrateBucketApproval(ctx, task interface{}) *gomock.Call

PreMigrateBucketApproval indicates an expected call of PreMigrateBucketApproval.

func (*MockApproverMockRecorder) QueryTasks added in v0.2.4

func (mr *MockApproverMockRecorder) QueryTasks(ctx, subKey interface{}) *gomock.Call

QueryTasks indicates an expected call of QueryTasks.

func (*MockApproverMockRecorder) ReleaseResource added in v0.2.4

func (mr *MockApproverMockRecorder) ReleaseResource(ctx, scope interface{}) *gomock.Call

ReleaseResource indicates an expected call of ReleaseResource.

func (*MockApproverMockRecorder) ReserveResource added in v0.2.4

func (mr *MockApproverMockRecorder) ReserveResource(ctx, state interface{}) *gomock.Call

ReserveResource indicates an expected call of ReserveResource.

func (*MockApproverMockRecorder) Start added in v0.2.4

func (mr *MockApproverMockRecorder) Start(ctx interface{}) *gomock.Call

Start indicates an expected call of Start.

func (*MockApproverMockRecorder) Stop added in v0.2.4

func (mr *MockApproverMockRecorder) Stop(ctx interface{}) *gomock.Call

Stop indicates an expected call of Stop.

type MockAuthenticator added in v0.2.4

type MockAuthenticator struct {
	// contains filtered or unexported fields
}

MockAuthenticator is a mock of Authenticator interface.

func NewMockAuthenticator added in v0.2.4

func NewMockAuthenticator(ctrl *gomock.Controller) *MockAuthenticator

NewMockAuthenticator creates a new mock instance.

func (*MockAuthenticator) EXPECT added in v0.2.4

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAuthenticator) GetAuthNonce added in v0.2.4

func (m *MockAuthenticator) GetAuthNonce(ctx context.Context, account, domain string) (*spdb.OffChainAuthKey, error)

GetAuthNonce mocks base method.

func (*MockAuthenticator) Name added in v0.2.4

func (m *MockAuthenticator) Name() string

Name mocks base method.

func (*MockAuthenticator) ReleaseResource added in v0.2.4

func (m *MockAuthenticator) ReleaseResource(ctx context.Context, scope rcmgr.ResourceScopeSpan)

ReleaseResource mocks base method.

func (*MockAuthenticator) ReserveResource added in v0.2.4

func (m *MockAuthenticator) ReserveResource(ctx context.Context, state *rcmgr.ScopeStat) (rcmgr.ResourceScopeSpan, error)

ReserveResource mocks base method.

func (*MockAuthenticator) Start added in v0.2.4

func (m *MockAuthenticator) Start(ctx context.Context) error

Start mocks base method.

func (*MockAuthenticator) Stop added in v0.2.4

func (m *MockAuthenticator) Stop(ctx context.Context) error

Stop mocks base method.

func (*MockAuthenticator) UpdateUserPublicKey added in v0.2.4

func (m *MockAuthenticator) UpdateUserPublicKey(ctx context.Context, account, domain string, currentNonce, nonce int32, userPublicKey string, expiryDate int64) (bool, error)

UpdateUserPublicKey mocks base method.

func (*MockAuthenticator) VerifyAuthentication added in v0.2.4

func (m *MockAuthenticator) VerifyAuthentication(ctx context.Context, auth AuthOpType, account, bucket, object string) (bool, error)

VerifyAuthentication mocks base method.

func (*MockAuthenticator) VerifyGNFD1EddsaSignature added in v0.2.4

func (m *MockAuthenticator) VerifyGNFD1EddsaSignature(ctx context.Context, account, domain, offChainSig string, realMsgToSign []byte) (bool, error)

VerifyGNFD1EddsaSignature mocks base method.

type MockAuthenticatorMockRecorder added in v0.2.4

type MockAuthenticatorMockRecorder struct {
	// contains filtered or unexported fields
}

MockAuthenticatorMockRecorder is the mock recorder for MockAuthenticator.

func (*MockAuthenticatorMockRecorder) GetAuthNonce added in v0.2.4

func (mr *MockAuthenticatorMockRecorder) GetAuthNonce(ctx, account, domain interface{}) *gomock.Call

GetAuthNonce indicates an expected call of GetAuthNonce.

func (*MockAuthenticatorMockRecorder) Name added in v0.2.4

Name indicates an expected call of Name.

func (*MockAuthenticatorMockRecorder) ReleaseResource added in v0.2.4

func (mr *MockAuthenticatorMockRecorder) ReleaseResource(ctx, scope interface{}) *gomock.Call

ReleaseResource indicates an expected call of ReleaseResource.

func (*MockAuthenticatorMockRecorder) ReserveResource added in v0.2.4

func (mr *MockAuthenticatorMockRecorder) ReserveResource(ctx, state interface{}) *gomock.Call

ReserveResource indicates an expected call of ReserveResource.

func (*MockAuthenticatorMockRecorder) Start added in v0.2.4

func (mr *MockAuthenticatorMockRecorder) Start(ctx interface{}) *gomock.Call

Start indicates an expected call of Start.

func (*MockAuthenticatorMockRecorder) Stop added in v0.2.4

func (mr *MockAuthenticatorMockRecorder) Stop(ctx interface{}) *gomock.Call

Stop indicates an expected call of Stop.

func (*MockAuthenticatorMockRecorder) UpdateUserPublicKey added in v0.2.4

func (mr *MockAuthenticatorMockRecorder) UpdateUserPublicKey(ctx, account, domain, currentNonce, nonce, userPublicKey, expiryDate interface{}) *gomock.Call

UpdateUserPublicKey indicates an expected call of UpdateUserPublicKey.

func (*MockAuthenticatorMockRecorder) VerifyAuthentication added in v0.2.4

func (mr *MockAuthenticatorMockRecorder) VerifyAuthentication(ctx, auth, account, bucket, object interface{}) *gomock.Call

VerifyAuthentication indicates an expected call of VerifyAuthentication.

func (*MockAuthenticatorMockRecorder) VerifyGNFD1EddsaSignature added in v0.2.4

func (mr *MockAuthenticatorMockRecorder) VerifyGNFD1EddsaSignature(ctx, account, domain, offChainSig, realMsgToSign interface{}) *gomock.Call

VerifyGNFD1EddsaSignature indicates an expected call of VerifyGNFD1EddsaSignature.

type MockDownloader added in v0.2.4

type MockDownloader struct {
	// contains filtered or unexported fields
}

MockDownloader is a mock of Downloader interface.

func NewMockDownloader added in v0.2.4

func NewMockDownloader(ctrl *gomock.Controller) *MockDownloader

NewMockDownloader creates a new mock instance.

func (*MockDownloader) EXPECT added in v0.2.4

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockDownloader) HandleChallengePiece added in v0.2.4

func (m *MockDownloader) HandleChallengePiece(ctx context.Context, task task.ChallengePieceTask) ([]byte, [][]byte, []byte, error)

HandleChallengePiece mocks base method.

func (*MockDownloader) HandleDownloadObjectTask added in v0.2.4

func (m *MockDownloader) HandleDownloadObjectTask(ctx context.Context, task task.DownloadObjectTask) ([]byte, error)

HandleDownloadObjectTask mocks base method.

func (*MockDownloader) HandleDownloadPieceTask added in v0.2.4

func (m *MockDownloader) HandleDownloadPieceTask(ctx context.Context, task task.DownloadPieceTask) ([]byte, error)

HandleDownloadPieceTask mocks base method.

func (*MockDownloader) Name added in v0.2.4

func (m *MockDownloader) Name() string

Name mocks base method.

func (*MockDownloader) PostChallengePiece added in v0.2.4

func (m *MockDownloader) PostChallengePiece(ctx context.Context, task task.ChallengePieceTask)

PostChallengePiece mocks base method.

func (*MockDownloader) PostDownloadObject added in v0.2.4

func (m *MockDownloader) PostDownloadObject(ctx context.Context, task task.DownloadObjectTask)

PostDownloadObject mocks base method.

func (*MockDownloader) PostDownloadPiece added in v0.2.4

func (m *MockDownloader) PostDownloadPiece(ctx context.Context, task task.DownloadPieceTask)

PostDownloadPiece mocks base method.

func (*MockDownloader) PreChallengePiece added in v0.2.4

func (m *MockDownloader) PreChallengePiece(ctx context.Context, task task.ChallengePieceTask) error

PreChallengePiece mocks base method.

func (*MockDownloader) PreDownloadObject added in v0.2.4

func (m *MockDownloader) PreDownloadObject(ctx context.Context, task task.DownloadObjectTask) error

PreDownloadObject mocks base method.

func (*MockDownloader) PreDownloadPiece added in v0.2.4

func (m *MockDownloader) PreDownloadPiece(ctx context.Context, task task.DownloadPieceTask) error

PreDownloadPiece mocks base method.

func (*MockDownloader) QueryTasks added in v0.2.4

func (m *MockDownloader) QueryTasks(ctx context.Context, subKey task.TKey) ([]task.Task, error)

QueryTasks mocks base method.

func (*MockDownloader) ReleaseResource added in v0.2.4

func (m *MockDownloader) ReleaseResource(ctx context.Context, scope rcmgr.ResourceScopeSpan)

ReleaseResource mocks base method.

func (*MockDownloader) ReserveResource added in v0.2.4

func (m *MockDownloader) ReserveResource(ctx context.Context, state *rcmgr.ScopeStat) (rcmgr.ResourceScopeSpan, error)

ReserveResource mocks base method.

func (*MockDownloader) Start added in v0.2.4

func (m *MockDownloader) Start(ctx context.Context) error

Start mocks base method.

func (*MockDownloader) Stop added in v0.2.4

func (m *MockDownloader) Stop(ctx context.Context) error

Stop mocks base method.

type MockDownloaderMockRecorder added in v0.2.4

type MockDownloaderMockRecorder struct {
	// contains filtered or unexported fields
}

MockDownloaderMockRecorder is the mock recorder for MockDownloader.

func (*MockDownloaderMockRecorder) HandleChallengePiece added in v0.2.4

func (mr *MockDownloaderMockRecorder) HandleChallengePiece(ctx, task interface{}) *gomock.Call

HandleChallengePiece indicates an expected call of HandleChallengePiece.

func (*MockDownloaderMockRecorder) HandleDownloadObjectTask added in v0.2.4

func (mr *MockDownloaderMockRecorder) HandleDownloadObjectTask(ctx, task interface{}) *gomock.Call

HandleDownloadObjectTask indicates an expected call of HandleDownloadObjectTask.

func (*MockDownloaderMockRecorder) HandleDownloadPieceTask added in v0.2.4

func (mr *MockDownloaderMockRecorder) HandleDownloadPieceTask(ctx, task interface{}) *gomock.Call

HandleDownloadPieceTask indicates an expected call of HandleDownloadPieceTask.

func (*MockDownloaderMockRecorder) Name added in v0.2.4

Name indicates an expected call of Name.

func (*MockDownloaderMockRecorder) PostChallengePiece added in v0.2.4

func (mr *MockDownloaderMockRecorder) PostChallengePiece(ctx, task interface{}) *gomock.Call

PostChallengePiece indicates an expected call of PostChallengePiece.

func (*MockDownloaderMockRecorder) PostDownloadObject added in v0.2.4

func (mr *MockDownloaderMockRecorder) PostDownloadObject(ctx, task interface{}) *gomock.Call

PostDownloadObject indicates an expected call of PostDownloadObject.

func (*MockDownloaderMockRecorder) PostDownloadPiece added in v0.2.4

func (mr *MockDownloaderMockRecorder) PostDownloadPiece(ctx, task interface{}) *gomock.Call

PostDownloadPiece indicates an expected call of PostDownloadPiece.

func (*MockDownloaderMockRecorder) PreChallengePiece added in v0.2.4

func (mr *MockDownloaderMockRecorder) PreChallengePiece(ctx, task interface{}) *gomock.Call

PreChallengePiece indicates an expected call of PreChallengePiece.

func (*MockDownloaderMockRecorder) PreDownloadObject added in v0.2.4

func (mr *MockDownloaderMockRecorder) PreDownloadObject(ctx, task interface{}) *gomock.Call

PreDownloadObject indicates an expected call of PreDownloadObject.

func (*MockDownloaderMockRecorder) PreDownloadPiece added in v0.2.4

func (mr *MockDownloaderMockRecorder) PreDownloadPiece(ctx, task interface{}) *gomock.Call

PreDownloadPiece indicates an expected call of PreDownloadPiece.

func (*MockDownloaderMockRecorder) QueryTasks added in v0.2.4

func (mr *MockDownloaderMockRecorder) QueryTasks(ctx, subKey interface{}) *gomock.Call

QueryTasks indicates an expected call of QueryTasks.

func (*MockDownloaderMockRecorder) ReleaseResource added in v0.2.4

func (mr *MockDownloaderMockRecorder) ReleaseResource(ctx, scope interface{}) *gomock.Call

ReleaseResource indicates an expected call of ReleaseResource.

func (*MockDownloaderMockRecorder) ReserveResource added in v0.2.4

func (mr *MockDownloaderMockRecorder) ReserveResource(ctx, state interface{}) *gomock.Call

ReserveResource indicates an expected call of ReserveResource.

func (*MockDownloaderMockRecorder) Start added in v0.2.4

func (mr *MockDownloaderMockRecorder) Start(ctx interface{}) *gomock.Call

Start indicates an expected call of Start.

func (*MockDownloaderMockRecorder) Stop added in v0.2.4

func (mr *MockDownloaderMockRecorder) Stop(ctx interface{}) *gomock.Call

Stop indicates an expected call of Stop.

type MockManager added in v0.2.4

type MockManager struct {
	// contains filtered or unexported fields
}

MockManager is a mock of Manager interface.

func NewMockManager added in v0.2.4

func NewMockManager(ctrl *gomock.Controller) *MockManager

NewMockManager creates a new mock instance.

func (*MockManager) DispatchTask added in v0.2.4

func (m *MockManager) DispatchTask(ctx context.Context, limit rcmgr.Limit) (task.Task, error)

DispatchTask mocks base method.

func (*MockManager) EXPECT added in v0.2.4

func (m *MockManager) EXPECT() *MockManagerMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockManager) HandleChallengePieceTask added in v0.2.4

func (m *MockManager) HandleChallengePieceTask(ctx context.Context, task task.ChallengePieceTask) error

HandleChallengePieceTask mocks base method.

func (*MockManager) HandleCreateResumableUploadObjectTask added in v0.2.4

func (m *MockManager) HandleCreateResumableUploadObjectTask(ctx context.Context, task task.ResumableUploadObjectTask) error

HandleCreateResumableUploadObjectTask mocks base method.

func (*MockManager) HandleCreateUploadObjectTask added in v0.2.4

func (m *MockManager) HandleCreateUploadObjectTask(ctx context.Context, task task.UploadObjectTask) error

HandleCreateUploadObjectTask mocks base method.

func (*MockManager) HandleDoneResumableUploadObjectTask added in v0.2.4

func (m *MockManager) HandleDoneResumableUploadObjectTask(ctx context.Context, task task.ResumableUploadObjectTask) error

HandleDoneResumableUploadObjectTask mocks base method.

func (*MockManager) HandleDoneUploadObjectTask added in v0.2.4

func (m *MockManager) HandleDoneUploadObjectTask(ctx context.Context, task task.UploadObjectTask) error

HandleDoneUploadObjectTask mocks base method.

func (*MockManager) HandleDownloadObjectTask added in v0.2.4

func (m *MockManager) HandleDownloadObjectTask(ctx context.Context, task task.DownloadObjectTask) error

HandleDownloadObjectTask mocks base method.

func (*MockManager) HandleGCMetaTask added in v0.2.4

func (m *MockManager) HandleGCMetaTask(ctx context.Context, task task.GCMetaTask) error

HandleGCMetaTask mocks base method.

func (*MockManager) HandleGCObjectTask added in v0.2.4

func (m *MockManager) HandleGCObjectTask(ctx context.Context, task task.GCObjectTask) error

HandleGCObjectTask mocks base method.

func (*MockManager) HandleGCZombiePieceTask added in v0.2.4

func (m *MockManager) HandleGCZombiePieceTask(ctx context.Context, task task.GCZombiePieceTask) error

HandleGCZombiePieceTask mocks base method.

func (*MockManager) HandleMigrateGVGTask added in v0.2.4

func (m *MockManager) HandleMigrateGVGTask(ctx context.Context, task task.MigrateGVGTask) error

HandleMigrateGVGTask mocks base method.

func (*MockManager) HandleReceivePieceTask added in v0.2.4

func (m *MockManager) HandleReceivePieceTask(ctx context.Context, task task.ReceivePieceTask) error

HandleReceivePieceTask mocks base method.

func (*MockManager) HandleRecoverPieceTask added in v0.2.4

func (m *MockManager) HandleRecoverPieceTask(ctx context.Context, task task.RecoveryPieceTask) error

HandleRecoverPieceTask mocks base method.

func (*MockManager) HandleReplicatePieceTask added in v0.2.4

func (m *MockManager) HandleReplicatePieceTask(ctx context.Context, task task.ReplicatePieceTask) error

HandleReplicatePieceTask mocks base method.

func (*MockManager) HandleSealObjectTask added in v0.2.4

func (m *MockManager) HandleSealObjectTask(ctx context.Context, task task.SealObjectTask) error

HandleSealObjectTask mocks base method.

func (*MockManager) Name added in v0.2.4

func (m *MockManager) Name() string

Name mocks base method.

func (*MockManager) NotifyMigrateSwapOut added in v0.2.4

func (m *MockManager) NotifyMigrateSwapOut(ctx context.Context, swapOut *types1.MsgSwapOut) error

NotifyMigrateSwapOut mocks base method.

func (*MockManager) PickVirtualGroupFamily added in v0.2.4

func (m *MockManager) PickVirtualGroupFamily(ctx context.Context, task task.ApprovalCreateBucketTask) (uint32, error)

PickVirtualGroupFamily mocks base method.

func (*MockManager) QueryBucketMigrate added in v0.2.4

QueryBucketMigrate mocks base method.

func (*MockManager) QuerySPByOperatorAddress added in v0.2.6

func (m *MockManager) QuerySPByOperatorAddress(ctx context.Context, operatorAddress string) (*types.StorageProvider, error)

QuerySPByOperatorAddress mocks base method.

func (*MockManager) QuerySpExit added in v0.2.4

QuerySpExit mocks base method.

func (*MockManager) QueryTasks added in v0.2.4

func (m *MockManager) QueryTasks(ctx context.Context, subKey task.TKey) ([]task.Task, error)

QueryTasks mocks base method.

func (*MockManager) QueryTasksStats added in v0.2.6

func (m *MockManager) QueryTasksStats(ctx context.Context) (int, int, int, int, int, int)

QueryTasksStats mocks base method.

func (*MockManager) ReleaseResource added in v0.2.4

func (m *MockManager) ReleaseResource(ctx context.Context, scope rcmgr.ResourceScopeSpan)

ReleaseResource mocks base method.

func (*MockManager) ReserveResource added in v0.2.4

func (m *MockManager) ReserveResource(ctx context.Context, state *rcmgr.ScopeStat) (rcmgr.ResourceScopeSpan, error)

ReserveResource mocks base method.

func (*MockManager) Start added in v0.2.4

func (m *MockManager) Start(ctx context.Context) error

Start mocks base method.

func (*MockManager) Stop added in v0.2.4

func (m *MockManager) Stop(ctx context.Context) error

Stop mocks base method.

type MockManagerMockRecorder added in v0.2.4

type MockManagerMockRecorder struct {
	// contains filtered or unexported fields
}

MockManagerMockRecorder is the mock recorder for MockManager.

func (*MockManagerMockRecorder) DispatchTask added in v0.2.4

func (mr *MockManagerMockRecorder) DispatchTask(ctx, limit interface{}) *gomock.Call

DispatchTask indicates an expected call of DispatchTask.

func (*MockManagerMockRecorder) HandleChallengePieceTask added in v0.2.4

func (mr *MockManagerMockRecorder) HandleChallengePieceTask(ctx, task interface{}) *gomock.Call

HandleChallengePieceTask indicates an expected call of HandleChallengePieceTask.

func (*MockManagerMockRecorder) HandleCreateResumableUploadObjectTask added in v0.2.4

func (mr *MockManagerMockRecorder) HandleCreateResumableUploadObjectTask(ctx, task interface{}) *gomock.Call

HandleCreateResumableUploadObjectTask indicates an expected call of HandleCreateResumableUploadObjectTask.

func (*MockManagerMockRecorder) HandleCreateUploadObjectTask added in v0.2.4

func (mr *MockManagerMockRecorder) HandleCreateUploadObjectTask(ctx, task interface{}) *gomock.Call

HandleCreateUploadObjectTask indicates an expected call of HandleCreateUploadObjectTask.

func (*MockManagerMockRecorder) HandleDoneResumableUploadObjectTask added in v0.2.4

func (mr *MockManagerMockRecorder) HandleDoneResumableUploadObjectTask(ctx, task interface{}) *gomock.Call

HandleDoneResumableUploadObjectTask indicates an expected call of HandleDoneResumableUploadObjectTask.

func (*MockManagerMockRecorder) HandleDoneUploadObjectTask added in v0.2.4

func (mr *MockManagerMockRecorder) HandleDoneUploadObjectTask(ctx, task interface{}) *gomock.Call

HandleDoneUploadObjectTask indicates an expected call of HandleDoneUploadObjectTask.

func (*MockManagerMockRecorder) HandleDownloadObjectTask added in v0.2.4

func (mr *MockManagerMockRecorder) HandleDownloadObjectTask(ctx, task interface{}) *gomock.Call

HandleDownloadObjectTask indicates an expected call of HandleDownloadObjectTask.

func (*MockManagerMockRecorder) HandleGCMetaTask added in v0.2.4

func (mr *MockManagerMockRecorder) HandleGCMetaTask(ctx, task interface{}) *gomock.Call

HandleGCMetaTask indicates an expected call of HandleGCMetaTask.

func (*MockManagerMockRecorder) HandleGCObjectTask added in v0.2.4

func (mr *MockManagerMockRecorder) HandleGCObjectTask(ctx, task interface{}) *gomock.Call

HandleGCObjectTask indicates an expected call of HandleGCObjectTask.

func (*MockManagerMockRecorder) HandleGCZombiePieceTask added in v0.2.4

func (mr *MockManagerMockRecorder) HandleGCZombiePieceTask(ctx, task interface{}) *gomock.Call

HandleGCZombiePieceTask indicates an expected call of HandleGCZombiePieceTask.

func (*MockManagerMockRecorder) HandleMigrateGVGTask added in v0.2.4

func (mr *MockManagerMockRecorder) HandleMigrateGVGTask(ctx, task interface{}) *gomock.Call

HandleMigrateGVGTask indicates an expected call of HandleMigrateGVGTask.

func (*MockManagerMockRecorder) HandleReceivePieceTask added in v0.2.4

func (mr *MockManagerMockRecorder) HandleReceivePieceTask(ctx, task interface{}) *gomock.Call

HandleReceivePieceTask indicates an expected call of HandleReceivePieceTask.

func (*MockManagerMockRecorder) HandleRecoverPieceTask added in v0.2.4

func (mr *MockManagerMockRecorder) HandleRecoverPieceTask(ctx, task interface{}) *gomock.Call

HandleRecoverPieceTask indicates an expected call of HandleRecoverPieceTask.

func (*MockManagerMockRecorder) HandleReplicatePieceTask added in v0.2.4

func (mr *MockManagerMockRecorder) HandleReplicatePieceTask(ctx, task interface{}) *gomock.Call

HandleReplicatePieceTask indicates an expected call of HandleReplicatePieceTask.

func (*MockManagerMockRecorder) HandleSealObjectTask added in v0.2.4

func (mr *MockManagerMockRecorder) HandleSealObjectTask(ctx, task interface{}) *gomock.Call

HandleSealObjectTask indicates an expected call of HandleSealObjectTask.

func (*MockManagerMockRecorder) Name added in v0.2.4

func (mr *MockManagerMockRecorder) Name() *gomock.Call

Name indicates an expected call of Name.

func (*MockManagerMockRecorder) NotifyMigrateSwapOut added in v0.2.4

func (mr *MockManagerMockRecorder) NotifyMigrateSwapOut(ctx, swapOut interface{}) *gomock.Call

NotifyMigrateSwapOut indicates an expected call of NotifyMigrateSwapOut.

func (*MockManagerMockRecorder) PickVirtualGroupFamily added in v0.2.4

func (mr *MockManagerMockRecorder) PickVirtualGroupFamily(ctx, task interface{}) *gomock.Call

PickVirtualGroupFamily indicates an expected call of PickVirtualGroupFamily.

func (*MockManagerMockRecorder) QueryBucketMigrate added in v0.2.4

func (mr *MockManagerMockRecorder) QueryBucketMigrate(ctx interface{}) *gomock.Call

QueryBucketMigrate indicates an expected call of QueryBucketMigrate.

func (*MockManagerMockRecorder) QuerySPByOperatorAddress added in v0.2.6

func (mr *MockManagerMockRecorder) QuerySPByOperatorAddress(ctx, operatorAddress interface{}) *gomock.Call

QuerySPByOperatorAddress indicates an expected call of QuerySPByOperatorAddress.

func (*MockManagerMockRecorder) QuerySpExit added in v0.2.4

func (mr *MockManagerMockRecorder) QuerySpExit(ctx interface{}) *gomock.Call

QuerySpExit indicates an expected call of QuerySpExit.

func (*MockManagerMockRecorder) QueryTasks added in v0.2.4

func (mr *MockManagerMockRecorder) QueryTasks(ctx, subKey interface{}) *gomock.Call

QueryTasks indicates an expected call of QueryTasks.

func (*MockManagerMockRecorder) QueryTasksStats added in v0.2.6

func (mr *MockManagerMockRecorder) QueryTasksStats(ctx interface{}) *gomock.Call

QueryTasksStats indicates an expected call of QueryTasksStats.

func (*MockManagerMockRecorder) ReleaseResource added in v0.2.4

func (mr *MockManagerMockRecorder) ReleaseResource(ctx, scope interface{}) *gomock.Call

ReleaseResource indicates an expected call of ReleaseResource.

func (*MockManagerMockRecorder) ReserveResource added in v0.2.4

func (mr *MockManagerMockRecorder) ReserveResource(ctx, state interface{}) *gomock.Call

ReserveResource indicates an expected call of ReserveResource.

func (*MockManagerMockRecorder) Start added in v0.2.4

func (mr *MockManagerMockRecorder) Start(ctx interface{}) *gomock.Call

Start indicates an expected call of Start.

func (*MockManagerMockRecorder) Stop added in v0.2.4

func (mr *MockManagerMockRecorder) Stop(ctx interface{}) *gomock.Call

Stop indicates an expected call of Stop.

type MockModular added in v0.2.4

type MockModular struct {
	// contains filtered or unexported fields
}

MockModular is a mock of Modular interface.

func NewMockModular added in v0.2.4

func NewMockModular(ctrl *gomock.Controller) *MockModular

NewMockModular creates a new mock instance.

func (*MockModular) EXPECT added in v0.2.4

func (m *MockModular) EXPECT() *MockModularMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockModular) Name added in v0.2.4

func (m *MockModular) Name() string

Name mocks base method.

func (*MockModular) ReleaseResource added in v0.2.4

func (m *MockModular) ReleaseResource(ctx context.Context, scope rcmgr.ResourceScopeSpan)

ReleaseResource mocks base method.

func (*MockModular) ReserveResource added in v0.2.4

func (m *MockModular) ReserveResource(ctx context.Context, state *rcmgr.ScopeStat) (rcmgr.ResourceScopeSpan, error)

ReserveResource mocks base method.

func (*MockModular) Start added in v0.2.4

func (m *MockModular) Start(ctx context.Context) error

Start mocks base method.

func (*MockModular) Stop added in v0.2.4

func (m *MockModular) Stop(ctx context.Context) error

Stop mocks base method.

type MockModularMockRecorder added in v0.2.4

type MockModularMockRecorder struct {
	// contains filtered or unexported fields
}

MockModularMockRecorder is the mock recorder for MockModular.

func (*MockModularMockRecorder) Name added in v0.2.4

func (mr *MockModularMockRecorder) Name() *gomock.Call

Name indicates an expected call of Name.

func (*MockModularMockRecorder) ReleaseResource added in v0.2.4

func (mr *MockModularMockRecorder) ReleaseResource(ctx, scope interface{}) *gomock.Call

ReleaseResource indicates an expected call of ReleaseResource.

func (*MockModularMockRecorder) ReserveResource added in v0.2.4

func (mr *MockModularMockRecorder) ReserveResource(ctx, state interface{}) *gomock.Call

ReserveResource indicates an expected call of ReserveResource.

func (*MockModularMockRecorder) Start added in v0.2.4

func (mr *MockModularMockRecorder) Start(ctx interface{}) *gomock.Call

Start indicates an expected call of Start.

func (*MockModularMockRecorder) Stop added in v0.2.4

func (mr *MockModularMockRecorder) Stop(ctx interface{}) *gomock.Call

Stop indicates an expected call of Stop.

type MockP2P added in v0.2.4

type MockP2P struct {
	// contains filtered or unexported fields
}

MockP2P is a mock of P2P interface.

func NewMockP2P added in v0.2.4

func NewMockP2P(ctrl *gomock.Controller) *MockP2P

NewMockP2P creates a new mock instance.

func (*MockP2P) EXPECT added in v0.2.4

func (m *MockP2P) EXPECT() *MockP2PMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockP2P) HandleQueryBootstrap added in v0.2.4

func (m *MockP2P) HandleQueryBootstrap(ctx context.Context) ([]string, error)

HandleQueryBootstrap mocks base method.

func (*MockP2P) HandleReplicatePieceApproval added in v0.2.4

func (m *MockP2P) HandleReplicatePieceApproval(ctx context.Context, t task.ApprovalReplicatePieceTask, min, max int32, timeout int64) ([]task.ApprovalReplicatePieceTask, error)

HandleReplicatePieceApproval mocks base method.

func (*MockP2P) Name added in v0.2.4

func (m *MockP2P) Name() string

Name mocks base method.

func (*MockP2P) QueryTasks added in v0.2.4

func (m *MockP2P) QueryTasks(ctx context.Context, subKey task.TKey) ([]task.Task, error)

QueryTasks mocks base method.

func (*MockP2P) ReleaseResource added in v0.2.4

func (m *MockP2P) ReleaseResource(ctx context.Context, scope rcmgr.ResourceScopeSpan)

ReleaseResource mocks base method.

func (*MockP2P) ReserveResource added in v0.2.4

func (m *MockP2P) ReserveResource(ctx context.Context, state *rcmgr.ScopeStat) (rcmgr.ResourceScopeSpan, error)

ReserveResource mocks base method.

func (*MockP2P) Start added in v0.2.4

func (m *MockP2P) Start(ctx context.Context) error

Start mocks base method.

func (*MockP2P) Stop added in v0.2.4

func (m *MockP2P) Stop(ctx context.Context) error

Stop mocks base method.

type MockP2PMockRecorder added in v0.2.4

type MockP2PMockRecorder struct {
	// contains filtered or unexported fields
}

MockP2PMockRecorder is the mock recorder for MockP2P.

func (*MockP2PMockRecorder) HandleQueryBootstrap added in v0.2.4

func (mr *MockP2PMockRecorder) HandleQueryBootstrap(ctx interface{}) *gomock.Call

HandleQueryBootstrap indicates an expected call of HandleQueryBootstrap.

func (*MockP2PMockRecorder) HandleReplicatePieceApproval added in v0.2.4

func (mr *MockP2PMockRecorder) HandleReplicatePieceApproval(ctx, t, min, max, timeout interface{}) *gomock.Call

HandleReplicatePieceApproval indicates an expected call of HandleReplicatePieceApproval.

func (*MockP2PMockRecorder) Name added in v0.2.4

func (mr *MockP2PMockRecorder) Name() *gomock.Call

Name indicates an expected call of Name.

func (*MockP2PMockRecorder) QueryTasks added in v0.2.4

func (mr *MockP2PMockRecorder) QueryTasks(ctx, subKey interface{}) *gomock.Call

QueryTasks indicates an expected call of QueryTasks.

func (*MockP2PMockRecorder) ReleaseResource added in v0.2.4

func (mr *MockP2PMockRecorder) ReleaseResource(ctx, scope interface{}) *gomock.Call

ReleaseResource indicates an expected call of ReleaseResource.

func (*MockP2PMockRecorder) ReserveResource added in v0.2.4

func (mr *MockP2PMockRecorder) ReserveResource(ctx, state interface{}) *gomock.Call

ReserveResource indicates an expected call of ReserveResource.

func (*MockP2PMockRecorder) Start added in v0.2.4

func (mr *MockP2PMockRecorder) Start(ctx interface{}) *gomock.Call

Start indicates an expected call of Start.

func (*MockP2PMockRecorder) Stop added in v0.2.4

func (mr *MockP2PMockRecorder) Stop(ctx interface{}) *gomock.Call

Stop indicates an expected call of Stop.

type MockReceiver added in v0.2.4

type MockReceiver struct {
	// contains filtered or unexported fields
}

MockReceiver is a mock of Receiver interface.

func NewMockReceiver added in v0.2.4

func NewMockReceiver(ctrl *gomock.Controller) *MockReceiver

NewMockReceiver creates a new mock instance.

func (*MockReceiver) EXPECT added in v0.2.4

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockReceiver) HandleDoneReceivePieceTask added in v0.2.4

func (m *MockReceiver) HandleDoneReceivePieceTask(ctx context.Context, task task.ReceivePieceTask) ([]byte, error)

HandleDoneReceivePieceTask mocks base method.

func (*MockReceiver) HandleReceivePieceTask added in v0.2.4

func (m *MockReceiver) HandleReceivePieceTask(ctx context.Context, task task.ReceivePieceTask, data []byte) error

HandleReceivePieceTask mocks base method.

func (*MockReceiver) Name added in v0.2.4

func (m *MockReceiver) Name() string

Name mocks base method.

func (*MockReceiver) QueryTasks added in v0.2.4

func (m *MockReceiver) QueryTasks(ctx context.Context, subKey task.TKey) ([]task.Task, error)

QueryTasks mocks base method.

func (*MockReceiver) ReleaseResource added in v0.2.4

func (m *MockReceiver) ReleaseResource(ctx context.Context, scope rcmgr.ResourceScopeSpan)

ReleaseResource mocks base method.

func (*MockReceiver) ReserveResource added in v0.2.4

func (m *MockReceiver) ReserveResource(ctx context.Context, state *rcmgr.ScopeStat) (rcmgr.ResourceScopeSpan, error)

ReserveResource mocks base method.

func (*MockReceiver) Start added in v0.2.4

func (m *MockReceiver) Start(ctx context.Context) error

Start mocks base method.

func (*MockReceiver) Stop added in v0.2.4

func (m *MockReceiver) Stop(ctx context.Context) error

Stop mocks base method.

type MockReceiverMockRecorder added in v0.2.4

type MockReceiverMockRecorder struct {
	// contains filtered or unexported fields
}

MockReceiverMockRecorder is the mock recorder for MockReceiver.

func (*MockReceiverMockRecorder) HandleDoneReceivePieceTask added in v0.2.4

func (mr *MockReceiverMockRecorder) HandleDoneReceivePieceTask(ctx, task interface{}) *gomock.Call

HandleDoneReceivePieceTask indicates an expected call of HandleDoneReceivePieceTask.

func (*MockReceiverMockRecorder) HandleReceivePieceTask added in v0.2.4

func (mr *MockReceiverMockRecorder) HandleReceivePieceTask(ctx, task, data interface{}) *gomock.Call

HandleReceivePieceTask indicates an expected call of HandleReceivePieceTask.

func (*MockReceiverMockRecorder) Name added in v0.2.4

func (mr *MockReceiverMockRecorder) Name() *gomock.Call

Name indicates an expected call of Name.

func (*MockReceiverMockRecorder) QueryTasks added in v0.2.4

func (mr *MockReceiverMockRecorder) QueryTasks(ctx, subKey interface{}) *gomock.Call

QueryTasks indicates an expected call of QueryTasks.

func (*MockReceiverMockRecorder) ReleaseResource added in v0.2.4

func (mr *MockReceiverMockRecorder) ReleaseResource(ctx, scope interface{}) *gomock.Call

ReleaseResource indicates an expected call of ReleaseResource.

func (*MockReceiverMockRecorder) ReserveResource added in v0.2.4

func (mr *MockReceiverMockRecorder) ReserveResource(ctx, state interface{}) *gomock.Call

ReserveResource indicates an expected call of ReserveResource.

func (*MockReceiverMockRecorder) Start added in v0.2.4

func (mr *MockReceiverMockRecorder) Start(ctx interface{}) *gomock.Call

Start indicates an expected call of Start.

func (*MockReceiverMockRecorder) Stop added in v0.2.4

func (mr *MockReceiverMockRecorder) Stop(ctx interface{}) *gomock.Call

Stop indicates an expected call of Stop.

type MockSigner added in v0.2.4

type MockSigner struct {
	// contains filtered or unexported fields
}

MockSigner is a mock of Signer interface.

func NewMockSigner added in v0.2.4

func NewMockSigner(ctrl *gomock.Controller) *MockSigner

NewMockSigner creates a new mock instance.

func (*MockSigner) CompleteMigrateBucket added in v0.2.4

func (m *MockSigner) CompleteMigrateBucket(ctx context.Context, migrateBucket *types0.MsgCompleteMigrateBucket) (string, error)

CompleteMigrateBucket mocks base method.

func (*MockSigner) CompleteSPExit added in v0.2.4

func (m *MockSigner) CompleteSPExit(ctx context.Context, completeSPExit *types1.MsgCompleteStorageProviderExit) (string, error)

CompleteSPExit mocks base method.

func (*MockSigner) CompleteSwapOut added in v0.2.4

func (m *MockSigner) CompleteSwapOut(ctx context.Context, completeSwapOut *types1.MsgCompleteSwapOut) (string, error)

CompleteSwapOut mocks base method.

func (*MockSigner) CreateGlobalVirtualGroup added in v0.2.4

func (m *MockSigner) CreateGlobalVirtualGroup(ctx context.Context, gvg *types1.MsgCreateGlobalVirtualGroup) (string, error)

CreateGlobalVirtualGroup mocks base method.

func (*MockSigner) DiscontinueBucket added in v0.2.4

func (m *MockSigner) DiscontinueBucket(ctx context.Context, bucket *types0.MsgDiscontinueBucket) (string, error)

DiscontinueBucket mocks base method.

func (*MockSigner) EXPECT added in v0.2.4

func (m *MockSigner) EXPECT() *MockSignerMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockSigner) Name added in v0.2.4

func (m *MockSigner) Name() string

Name mocks base method.

func (*MockSigner) RejectUnSealObject added in v0.2.4

func (m *MockSigner) RejectUnSealObject(ctx context.Context, object *types0.MsgRejectSealObject) (string, error)

RejectUnSealObject mocks base method.

func (*MockSigner) ReleaseResource added in v0.2.4

func (m *MockSigner) ReleaseResource(ctx context.Context, scope rcmgr.ResourceScopeSpan)

ReleaseResource mocks base method.

func (*MockSigner) ReserveResource added in v0.2.4

func (m *MockSigner) ReserveResource(ctx context.Context, state *rcmgr.ScopeStat) (rcmgr.ResourceScopeSpan, error)

ReserveResource mocks base method.

func (*MockSigner) SPExit added in v0.2.4

func (m *MockSigner) SPExit(ctx context.Context, spExit *types1.MsgStorageProviderExit) (string, error)

SPExit mocks base method.

func (*MockSigner) SealObject added in v0.2.4

func (m *MockSigner) SealObject(ctx context.Context, object *types0.MsgSealObject) (string, error)

SealObject mocks base method.

func (*MockSigner) SignCreateBucketApproval added in v0.2.4

func (m *MockSigner) SignCreateBucketApproval(ctx context.Context, bucket *types0.MsgCreateBucket) ([]byte, error)

SignCreateBucketApproval mocks base method.

func (*MockSigner) SignCreateObjectApproval added in v0.2.4

func (m *MockSigner) SignCreateObjectApproval(ctx context.Context, task *types0.MsgCreateObject) ([]byte, error)

SignCreateObjectApproval mocks base method.

func (*MockSigner) SignMigrateBucketApproval added in v0.2.4

func (m *MockSigner) SignMigrateBucketApproval(ctx context.Context, bucket *types0.MsgMigrateBucket) ([]byte, error)

SignMigrateBucketApproval mocks base method.

func (*MockSigner) SignMigrateGVG added in v0.2.6

func (m *MockSigner) SignMigrateGVG(ctx context.Context, task *gfsptask.GfSpMigrateGVGTask) ([]byte, error)

SignMigrateGVG mocks base method.

func (*MockSigner) SignMigratePiece added in v0.2.4

func (m *MockSigner) SignMigratePiece(ctx context.Context, task *gfsptask.GfSpMigratePieceTask) ([]byte, error)

SignMigratePiece mocks base method.

func (*MockSigner) SignP2PPingMsg added in v0.2.4

func (m *MockSigner) SignP2PPingMsg(ctx context.Context, ping *gfspp2p.GfSpPing) ([]byte, error)

SignP2PPingMsg mocks base method.

func (*MockSigner) SignP2PPongMsg added in v0.2.4

func (m *MockSigner) SignP2PPongMsg(ctx context.Context, pong *gfspp2p.GfSpPong) ([]byte, error)

SignP2PPongMsg mocks base method.

func (*MockSigner) SignReceivePieceTask added in v0.2.4

func (m *MockSigner) SignReceivePieceTask(ctx context.Context, task task.ReceivePieceTask) ([]byte, error)

SignReceivePieceTask mocks base method.

func (*MockSigner) SignRecoveryPieceTask added in v0.2.4

func (m *MockSigner) SignRecoveryPieceTask(ctx context.Context, task task.RecoveryPieceTask) ([]byte, error)

SignRecoveryPieceTask mocks base method.

func (*MockSigner) SignReplicatePieceApproval added in v0.2.4

func (m *MockSigner) SignReplicatePieceApproval(ctx context.Context, task task.ApprovalReplicatePieceTask) ([]byte, error)

SignReplicatePieceApproval mocks base method.

func (*MockSigner) SignSecondarySPMigrationBucket added in v0.2.4

func (m *MockSigner) SignSecondarySPMigrationBucket(ctx context.Context, signDoc *types0.SecondarySpMigrationBucketSignDoc) ([]byte, error)

SignSecondarySPMigrationBucket mocks base method.

func (*MockSigner) SignSecondarySealBls added in v0.2.4

func (m *MockSigner) SignSecondarySealBls(ctx context.Context, objectID uint64, gvgId uint32, hash [][]byte) ([]byte, error)

SignSecondarySealBls mocks base method.

func (*MockSigner) SignSwapOut added in v0.2.4

func (m *MockSigner) SignSwapOut(ctx context.Context, swapOut *types1.MsgSwapOut) ([]byte, error)

SignSwapOut mocks base method.

func (*MockSigner) Start added in v0.2.4

func (m *MockSigner) Start(ctx context.Context) error

Start mocks base method.

func (*MockSigner) Stop added in v0.2.4

func (m *MockSigner) Stop(ctx context.Context) error

Stop mocks base method.

func (*MockSigner) SwapOut added in v0.2.4

func (m *MockSigner) SwapOut(ctx context.Context, swapOut *types1.MsgSwapOut) (string, error)

SwapOut mocks base method.

func (*MockSigner) UpdateSPPrice added in v0.2.4

func (m *MockSigner) UpdateSPPrice(ctx context.Context, price *types.MsgUpdateSpStoragePrice) (string, error)

UpdateSPPrice mocks base method.

type MockSignerMockRecorder added in v0.2.4

type MockSignerMockRecorder struct {
	// contains filtered or unexported fields
}

MockSignerMockRecorder is the mock recorder for MockSigner.

func (*MockSignerMockRecorder) CompleteMigrateBucket added in v0.2.4

func (mr *MockSignerMockRecorder) CompleteMigrateBucket(ctx, migrateBucket interface{}) *gomock.Call

CompleteMigrateBucket indicates an expected call of CompleteMigrateBucket.

func (*MockSignerMockRecorder) CompleteSPExit added in v0.2.4

func (mr *MockSignerMockRecorder) CompleteSPExit(ctx, completeSPExit interface{}) *gomock.Call

CompleteSPExit indicates an expected call of CompleteSPExit.

func (*MockSignerMockRecorder) CompleteSwapOut added in v0.2.4

func (mr *MockSignerMockRecorder) CompleteSwapOut(ctx, completeSwapOut interface{}) *gomock.Call

CompleteSwapOut indicates an expected call of CompleteSwapOut.

func (*MockSignerMockRecorder) CreateGlobalVirtualGroup added in v0.2.4

func (mr *MockSignerMockRecorder) CreateGlobalVirtualGroup(ctx, gvg interface{}) *gomock.Call

CreateGlobalVirtualGroup indicates an expected call of CreateGlobalVirtualGroup.

func (*MockSignerMockRecorder) DiscontinueBucket added in v0.2.4

func (mr *MockSignerMockRecorder) DiscontinueBucket(ctx, bucket interface{}) *gomock.Call

DiscontinueBucket indicates an expected call of DiscontinueBucket.

func (*MockSignerMockRecorder) Name added in v0.2.4

func (mr *MockSignerMockRecorder) Name() *gomock.Call

Name indicates an expected call of Name.

func (*MockSignerMockRecorder) RejectUnSealObject added in v0.2.4

func (mr *MockSignerMockRecorder) RejectUnSealObject(ctx, object interface{}) *gomock.Call

RejectUnSealObject indicates an expected call of RejectUnSealObject.

func (*MockSignerMockRecorder) ReleaseResource added in v0.2.4

func (mr *MockSignerMockRecorder) ReleaseResource(ctx, scope interface{}) *gomock.Call

ReleaseResource indicates an expected call of ReleaseResource.

func (*MockSignerMockRecorder) ReserveResource added in v0.2.4

func (mr *MockSignerMockRecorder) ReserveResource(ctx, state interface{}) *gomock.Call

ReserveResource indicates an expected call of ReserveResource.

func (*MockSignerMockRecorder) SPExit added in v0.2.4

func (mr *MockSignerMockRecorder) SPExit(ctx, spExit interface{}) *gomock.Call

SPExit indicates an expected call of SPExit.

func (*MockSignerMockRecorder) SealObject added in v0.2.4

func (mr *MockSignerMockRecorder) SealObject(ctx, object interface{}) *gomock.Call

SealObject indicates an expected call of SealObject.

func (*MockSignerMockRecorder) SignCreateBucketApproval added in v0.2.4

func (mr *MockSignerMockRecorder) SignCreateBucketApproval(ctx, bucket interface{}) *gomock.Call

SignCreateBucketApproval indicates an expected call of SignCreateBucketApproval.

func (*MockSignerMockRecorder) SignCreateObjectApproval added in v0.2.4

func (mr *MockSignerMockRecorder) SignCreateObjectApproval(ctx, task interface{}) *gomock.Call

SignCreateObjectApproval indicates an expected call of SignCreateObjectApproval.

func (*MockSignerMockRecorder) SignMigrateBucketApproval added in v0.2.4

func (mr *MockSignerMockRecorder) SignMigrateBucketApproval(ctx, bucket interface{}) *gomock.Call

SignMigrateBucketApproval indicates an expected call of SignMigrateBucketApproval.

func (*MockSignerMockRecorder) SignMigrateGVG added in v0.2.6

func (mr *MockSignerMockRecorder) SignMigrateGVG(ctx, task interface{}) *gomock.Call

SignMigrateGVG indicates an expected call of SignMigrateGVG.

func (*MockSignerMockRecorder) SignMigratePiece added in v0.2.4

func (mr *MockSignerMockRecorder) SignMigratePiece(ctx, task interface{}) *gomock.Call

SignMigratePiece indicates an expected call of SignMigratePiece.

func (*MockSignerMockRecorder) SignP2PPingMsg added in v0.2.4

func (mr *MockSignerMockRecorder) SignP2PPingMsg(ctx, ping interface{}) *gomock.Call

SignP2PPingMsg indicates an expected call of SignP2PPingMsg.

func (*MockSignerMockRecorder) SignP2PPongMsg added in v0.2.4

func (mr *MockSignerMockRecorder) SignP2PPongMsg(ctx, pong interface{}) *gomock.Call

SignP2PPongMsg indicates an expected call of SignP2PPongMsg.

func (*MockSignerMockRecorder) SignReceivePieceTask added in v0.2.4

func (mr *MockSignerMockRecorder) SignReceivePieceTask(ctx, task interface{}) *gomock.Call

SignReceivePieceTask indicates an expected call of SignReceivePieceTask.

func (*MockSignerMockRecorder) SignRecoveryPieceTask added in v0.2.4

func (mr *MockSignerMockRecorder) SignRecoveryPieceTask(ctx, task interface{}) *gomock.Call

SignRecoveryPieceTask indicates an expected call of SignRecoveryPieceTask.

func (*MockSignerMockRecorder) SignReplicatePieceApproval added in v0.2.4

func (mr *MockSignerMockRecorder) SignReplicatePieceApproval(ctx, task interface{}) *gomock.Call

SignReplicatePieceApproval indicates an expected call of SignReplicatePieceApproval.

func (*MockSignerMockRecorder) SignSecondarySPMigrationBucket added in v0.2.4

func (mr *MockSignerMockRecorder) SignSecondarySPMigrationBucket(ctx, signDoc interface{}) *gomock.Call

SignSecondarySPMigrationBucket indicates an expected call of SignSecondarySPMigrationBucket.

func (*MockSignerMockRecorder) SignSecondarySealBls added in v0.2.4

func (mr *MockSignerMockRecorder) SignSecondarySealBls(ctx, objectID, gvgId, hash interface{}) *gomock.Call

SignSecondarySealBls indicates an expected call of SignSecondarySealBls.

func (*MockSignerMockRecorder) SignSwapOut added in v0.2.4

func (mr *MockSignerMockRecorder) SignSwapOut(ctx, swapOut interface{}) *gomock.Call

SignSwapOut indicates an expected call of SignSwapOut.

func (*MockSignerMockRecorder) Start added in v0.2.4

func (mr *MockSignerMockRecorder) Start(ctx interface{}) *gomock.Call

Start indicates an expected call of Start.

func (*MockSignerMockRecorder) Stop added in v0.2.4

func (mr *MockSignerMockRecorder) Stop(ctx interface{}) *gomock.Call

Stop indicates an expected call of Stop.

func (*MockSignerMockRecorder) SwapOut added in v0.2.4

func (mr *MockSignerMockRecorder) SwapOut(ctx, swapOut interface{}) *gomock.Call

SwapOut indicates an expected call of SwapOut.

func (*MockSignerMockRecorder) UpdateSPPrice added in v0.2.4

func (mr *MockSignerMockRecorder) UpdateSPPrice(ctx, price interface{}) *gomock.Call

UpdateSPPrice indicates an expected call of UpdateSPPrice.

type MockTaskExecutor added in v0.2.4

type MockTaskExecutor struct {
	// contains filtered or unexported fields
}

MockTaskExecutor is a mock of TaskExecutor interface.

func NewMockTaskExecutor added in v0.2.4

func NewMockTaskExecutor(ctrl *gomock.Controller) *MockTaskExecutor

NewMockTaskExecutor creates a new mock instance.

func (*MockTaskExecutor) AskTask added in v0.2.4

func (m *MockTaskExecutor) AskTask(ctx context.Context) error

AskTask mocks base method.

func (*MockTaskExecutor) EXPECT added in v0.2.4

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTaskExecutor) HandleGCMetaTask added in v0.2.4

func (m *MockTaskExecutor) HandleGCMetaTask(ctx context.Context, task task.GCMetaTask)

HandleGCMetaTask mocks base method.

func (*MockTaskExecutor) HandleGCObjectTask added in v0.2.4

func (m *MockTaskExecutor) HandleGCObjectTask(ctx context.Context, task task.GCObjectTask)

HandleGCObjectTask mocks base method.

func (*MockTaskExecutor) HandleGCZombiePieceTask added in v0.2.4

func (m *MockTaskExecutor) HandleGCZombiePieceTask(ctx context.Context, task task.GCZombiePieceTask)

HandleGCZombiePieceTask mocks base method.

func (*MockTaskExecutor) HandleMigrateGVGTask added in v0.2.4

func (m *MockTaskExecutor) HandleMigrateGVGTask(ctx context.Context, gvgTask task.MigrateGVGTask)

HandleMigrateGVGTask mocks base method.

func (*MockTaskExecutor) HandleReceivePieceTask added in v0.2.4

func (m *MockTaskExecutor) HandleReceivePieceTask(ctx context.Context, task task.ReceivePieceTask)

HandleReceivePieceTask mocks base method.

func (*MockTaskExecutor) HandleReplicatePieceTask added in v0.2.4

func (m *MockTaskExecutor) HandleReplicatePieceTask(ctx context.Context, task task.ReplicatePieceTask)

HandleReplicatePieceTask mocks base method.

func (*MockTaskExecutor) HandleSealObjectTask added in v0.2.4

func (m *MockTaskExecutor) HandleSealObjectTask(ctx context.Context, task task.SealObjectTask)

HandleSealObjectTask mocks base method.

func (*MockTaskExecutor) Name added in v0.2.4

func (m *MockTaskExecutor) Name() string

Name mocks base method.

func (*MockTaskExecutor) ReleaseResource added in v0.2.4

func (m *MockTaskExecutor) ReleaseResource(ctx context.Context, scope rcmgr.ResourceScopeSpan)

ReleaseResource mocks base method.

func (*MockTaskExecutor) ReportTask added in v0.2.4

func (m *MockTaskExecutor) ReportTask(ctx context.Context, task task.Task) error

ReportTask mocks base method.

func (*MockTaskExecutor) ReserveResource added in v0.2.4

func (m *MockTaskExecutor) ReserveResource(ctx context.Context, state *rcmgr.ScopeStat) (rcmgr.ResourceScopeSpan, error)

ReserveResource mocks base method.

func (*MockTaskExecutor) Start added in v0.2.4

func (m *MockTaskExecutor) Start(ctx context.Context) error

Start mocks base method.

func (*MockTaskExecutor) Stop added in v0.2.4

func (m *MockTaskExecutor) Stop(ctx context.Context) error

Stop mocks base method.

type MockTaskExecutorMockRecorder added in v0.2.4

type MockTaskExecutorMockRecorder struct {
	// contains filtered or unexported fields
}

MockTaskExecutorMockRecorder is the mock recorder for MockTaskExecutor.

func (*MockTaskExecutorMockRecorder) AskTask added in v0.2.4

func (mr *MockTaskExecutorMockRecorder) AskTask(ctx interface{}) *gomock.Call

AskTask indicates an expected call of AskTask.

func (*MockTaskExecutorMockRecorder) HandleGCMetaTask added in v0.2.4

func (mr *MockTaskExecutorMockRecorder) HandleGCMetaTask(ctx, task interface{}) *gomock.Call

HandleGCMetaTask indicates an expected call of HandleGCMetaTask.

func (*MockTaskExecutorMockRecorder) HandleGCObjectTask added in v0.2.4

func (mr *MockTaskExecutorMockRecorder) HandleGCObjectTask(ctx, task interface{}) *gomock.Call

HandleGCObjectTask indicates an expected call of HandleGCObjectTask.

func (*MockTaskExecutorMockRecorder) HandleGCZombiePieceTask added in v0.2.4

func (mr *MockTaskExecutorMockRecorder) HandleGCZombiePieceTask(ctx, task interface{}) *gomock.Call

HandleGCZombiePieceTask indicates an expected call of HandleGCZombiePieceTask.

func (*MockTaskExecutorMockRecorder) HandleMigrateGVGTask added in v0.2.4

func (mr *MockTaskExecutorMockRecorder) HandleMigrateGVGTask(ctx, gvgTask interface{}) *gomock.Call

HandleMigrateGVGTask indicates an expected call of HandleMigrateGVGTask.

func (*MockTaskExecutorMockRecorder) HandleReceivePieceTask added in v0.2.4

func (mr *MockTaskExecutorMockRecorder) HandleReceivePieceTask(ctx, task interface{}) *gomock.Call

HandleReceivePieceTask indicates an expected call of HandleReceivePieceTask.

func (*MockTaskExecutorMockRecorder) HandleReplicatePieceTask added in v0.2.4

func (mr *MockTaskExecutorMockRecorder) HandleReplicatePieceTask(ctx, task interface{}) *gomock.Call

HandleReplicatePieceTask indicates an expected call of HandleReplicatePieceTask.

func (*MockTaskExecutorMockRecorder) HandleSealObjectTask added in v0.2.4

func (mr *MockTaskExecutorMockRecorder) HandleSealObjectTask(ctx, task interface{}) *gomock.Call

HandleSealObjectTask indicates an expected call of HandleSealObjectTask.

func (*MockTaskExecutorMockRecorder) Name added in v0.2.4

Name indicates an expected call of Name.

func (*MockTaskExecutorMockRecorder) ReleaseResource added in v0.2.4

func (mr *MockTaskExecutorMockRecorder) ReleaseResource(ctx, scope interface{}) *gomock.Call

ReleaseResource indicates an expected call of ReleaseResource.

func (*MockTaskExecutorMockRecorder) ReportTask added in v0.2.4

func (mr *MockTaskExecutorMockRecorder) ReportTask(ctx, task interface{}) *gomock.Call

ReportTask indicates an expected call of ReportTask.

func (*MockTaskExecutorMockRecorder) ReserveResource added in v0.2.4

func (mr *MockTaskExecutorMockRecorder) ReserveResource(ctx, state interface{}) *gomock.Call

ReserveResource indicates an expected call of ReserveResource.

func (*MockTaskExecutorMockRecorder) Start added in v0.2.4

func (mr *MockTaskExecutorMockRecorder) Start(ctx interface{}) *gomock.Call

Start indicates an expected call of Start.

func (*MockTaskExecutorMockRecorder) Stop added in v0.2.4

func (mr *MockTaskExecutorMockRecorder) Stop(ctx interface{}) *gomock.Call

Stop indicates an expected call of Stop.

type MockUploader added in v0.2.4

type MockUploader struct {
	// contains filtered or unexported fields
}

MockUploader is a mock of Uploader interface.

func NewMockUploader added in v0.2.4

func NewMockUploader(ctrl *gomock.Controller) *MockUploader

NewMockUploader creates a new mock instance.

func (*MockUploader) EXPECT added in v0.2.4

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockUploader) HandleResumableUploadObjectTask added in v0.2.4

func (m *MockUploader) HandleResumableUploadObjectTask(ctx context.Context, task task.ResumableUploadObjectTask, stream io.Reader) error

HandleResumableUploadObjectTask mocks base method.

func (*MockUploader) HandleUploadObjectTask added in v0.2.4

func (m *MockUploader) HandleUploadObjectTask(ctx context.Context, task task.UploadObjectTask, stream io.Reader) error

HandleUploadObjectTask mocks base method.

func (*MockUploader) Name added in v0.2.4

func (m *MockUploader) Name() string

Name mocks base method.

func (*MockUploader) PostResumableUploadObject added in v0.2.4

func (m *MockUploader) PostResumableUploadObject(ctx context.Context, task task.ResumableUploadObjectTask)

PostResumableUploadObject mocks base method.

func (*MockUploader) PostUploadObject added in v0.2.4

func (m *MockUploader) PostUploadObject(ctx context.Context, task task.UploadObjectTask)

PostUploadObject mocks base method.

func (*MockUploader) PreResumableUploadObject added in v0.2.4

func (m *MockUploader) PreResumableUploadObject(ctx context.Context, task task.ResumableUploadObjectTask) error

PreResumableUploadObject mocks base method.

func (*MockUploader) PreUploadObject added in v0.2.4

func (m *MockUploader) PreUploadObject(ctx context.Context, task task.UploadObjectTask) error

PreUploadObject mocks base method.

func (*MockUploader) QueryTasks added in v0.2.4

func (m *MockUploader) QueryTasks(ctx context.Context, subKey task.TKey) ([]task.Task, error)

QueryTasks mocks base method.

func (*MockUploader) ReleaseResource added in v0.2.4

func (m *MockUploader) ReleaseResource(ctx context.Context, scope rcmgr.ResourceScopeSpan)

ReleaseResource mocks base method.

func (*MockUploader) ReserveResource added in v0.2.4

func (m *MockUploader) ReserveResource(ctx context.Context, state *rcmgr.ScopeStat) (rcmgr.ResourceScopeSpan, error)

ReserveResource mocks base method.

func (*MockUploader) Start added in v0.2.4

func (m *MockUploader) Start(ctx context.Context) error

Start mocks base method.

func (*MockUploader) Stop added in v0.2.4

func (m *MockUploader) Stop(ctx context.Context) error

Stop mocks base method.

type MockUploaderMockRecorder added in v0.2.4

type MockUploaderMockRecorder struct {
	// contains filtered or unexported fields
}

MockUploaderMockRecorder is the mock recorder for MockUploader.

func (*MockUploaderMockRecorder) HandleResumableUploadObjectTask added in v0.2.4

func (mr *MockUploaderMockRecorder) HandleResumableUploadObjectTask(ctx, task, stream interface{}) *gomock.Call

HandleResumableUploadObjectTask indicates an expected call of HandleResumableUploadObjectTask.

func (*MockUploaderMockRecorder) HandleUploadObjectTask added in v0.2.4

func (mr *MockUploaderMockRecorder) HandleUploadObjectTask(ctx, task, stream interface{}) *gomock.Call

HandleUploadObjectTask indicates an expected call of HandleUploadObjectTask.

func (*MockUploaderMockRecorder) Name added in v0.2.4

func (mr *MockUploaderMockRecorder) Name() *gomock.Call

Name indicates an expected call of Name.

func (*MockUploaderMockRecorder) PostResumableUploadObject added in v0.2.4

func (mr *MockUploaderMockRecorder) PostResumableUploadObject(ctx, task interface{}) *gomock.Call

PostResumableUploadObject indicates an expected call of PostResumableUploadObject.

func (*MockUploaderMockRecorder) PostUploadObject added in v0.2.4

func (mr *MockUploaderMockRecorder) PostUploadObject(ctx, task interface{}) *gomock.Call

PostUploadObject indicates an expected call of PostUploadObject.

func (*MockUploaderMockRecorder) PreResumableUploadObject added in v0.2.4

func (mr *MockUploaderMockRecorder) PreResumableUploadObject(ctx, task interface{}) *gomock.Call

PreResumableUploadObject indicates an expected call of PreResumableUploadObject.

func (*MockUploaderMockRecorder) PreUploadObject added in v0.2.4

func (mr *MockUploaderMockRecorder) PreUploadObject(ctx, task interface{}) *gomock.Call

PreUploadObject indicates an expected call of PreUploadObject.

func (*MockUploaderMockRecorder) QueryTasks added in v0.2.4

func (mr *MockUploaderMockRecorder) QueryTasks(ctx, subKey interface{}) *gomock.Call

QueryTasks indicates an expected call of QueryTasks.

func (*MockUploaderMockRecorder) ReleaseResource added in v0.2.4

func (mr *MockUploaderMockRecorder) ReleaseResource(ctx, scope interface{}) *gomock.Call

ReleaseResource indicates an expected call of ReleaseResource.

func (*MockUploaderMockRecorder) ReserveResource added in v0.2.4

func (mr *MockUploaderMockRecorder) ReserveResource(ctx, state interface{}) *gomock.Call

ReserveResource indicates an expected call of ReserveResource.

func (*MockUploaderMockRecorder) Start added in v0.2.4

func (mr *MockUploaderMockRecorder) Start(ctx interface{}) *gomock.Call

Start indicates an expected call of Start.

func (*MockUploaderMockRecorder) Stop added in v0.2.4

func (mr *MockUploaderMockRecorder) Stop(ctx interface{}) *gomock.Call

Stop indicates an expected call of Stop.

type Modular

type Modular interface {
	lifecycle.Service
	// ReserveResource reserves the resources from Modular resources pool.
	ReserveResource(ctx context.Context, state *rcmgr.ScopeStat) (rcmgr.ResourceScopeSpan, error)
	// ReleaseResource releases the resources to Modular resources pool.
	ReleaseResource(ctx context.Context, scope rcmgr.ResourceScopeSpan)
}

Modular is a common interface for submodules that are scheduled by the GfSp framework. It inherits lifecycle.Service interface, which is used to manage lifecycle of services. Additionally, Modular is managed by ResourceManager, which allows the GfSp framework to reserve and release resources from the Modular resource pool.

type NilModular

type NilModular struct{}

func (*NilModular) AskTask

func (*NilModular) AskTask(context.Context) error

func (*NilModular) CompleteMigrateBucket added in v0.2.3

func (*NilModular) CompleteMigrateBucket(ctx context.Context, migrateBucket *storagetypes.MsgCompleteMigrateBucket) (string, error)

func (*NilModular) CompleteSPExit added in v0.2.3

func (*NilModular) CompleteSPExit(ctx context.Context, completeSPExit *virtualgrouptypes.MsgCompleteStorageProviderExit) (string, error)

func (*NilModular) CompleteSwapOut added in v0.2.3

func (*NilModular) CompleteSwapOut(ctx context.Context, completeSwapOut *virtualgrouptypes.MsgCompleteSwapOut) (string, error)

func (*NilModular) CreateGlobalVirtualGroup added in v0.2.3

func (*NilModular) DiscontinueBucket

func (*NilModular) HandleChallengePiece

func (*NilModular) HandleChallengePiece(context.Context, task.ChallengePieceTask) ([]byte, [][]byte, []byte, error)

func (*NilModular) HandleDownloadObjectTask

func (*NilModular) HandleDownloadObjectTask(context.Context, task.DownloadObjectTask) ([]byte, error)

func (*NilModular) HandleDownloadPieceTask

func (*NilModular) HandleDownloadPieceTask(context.Context, task.DownloadPieceTask) ([]byte, error)

func (*NilModular) HandleGCMetaTask

func (*NilModular) HandleGCMetaTask(context.Context, task.GCMetaTask)

func (*NilModular) HandleGCObjectTask

func (*NilModular) HandleGCObjectTask(context.Context, task.GCObjectTask)

func (*NilModular) HandleGCZombiePieceTask

func (*NilModular) HandleGCZombiePieceTask(context.Context, task.GCZombiePieceTask)

func (*NilModular) HandleMigrateGVGTask added in v0.2.3

func (*NilModular) HandleMigrateGVGTask(ctx context.Context, gvgTask task.MigrateGVGTask)

func (*NilModular) HandleQueryBootstrap

func (*NilModular) HandleQueryBootstrap(context.Context) ([]string, error)

func (*NilModular) HandleReceivePieceTask

func (*NilModular) HandleReceivePieceTask(context.Context, task.ReceivePieceTask)

func (*NilModular) HandleReplicatePieceTask

func (*NilModular) HandleReplicatePieceTask(context.Context, task.ReplicatePieceTask)

func (*NilModular) HandleSealObjectTask

func (*NilModular) HandleSealObjectTask(context.Context, task.SealObjectTask)

func (*NilModular) Name

func (*NilModular) Name() string

func (*NilModular) PostChallengePiece

func (*NilModular) PostChallengePiece(context.Context, task.ChallengePieceTask)

func (*NilModular) PostDownloadObject

func (*NilModular) PostDownloadObject(context.Context, task.DownloadObjectTask)

func (*NilModular) PostDownloadPiece

func (*NilModular) PostDownloadPiece(context.Context, task.DownloadPieceTask)

func (*NilModular) PreChallengePiece

func (*NilModular) PreChallengePiece(context.Context, task.ChallengePieceTask) error

func (*NilModular) PreDownloadObject

func (*NilModular) PreDownloadObject(context.Context, task.DownloadObjectTask) error

func (*NilModular) PreDownloadPiece

func (*NilModular) PreDownloadPiece(context.Context, task.DownloadPieceTask) error

func (*NilModular) QueryTasks

func (*NilModular) QueryTasks(ctx context.Context, keyPrefix task.TKey) ([]task.Task, error)

func (*NilModular) RejectUnSealObject

func (*NilModular) ReleaseResource

func (*NilModular) ReleaseResource(context.Context, rcmgr.ResourceScopeSpan)

func (*NilModular) ReportTask

func (*NilModular) ReportTask(context.Context, task.Task) error

func (*NilModular) ReserveResource

func (*NilModular) SPExit added in v0.2.3

func (*NilModular) SealObject

func (*NilModular) SignCreateBucketApproval

func (*NilModular) SignCreateBucketApproval(context.Context, *storagetypes.MsgCreateBucket) ([]byte, error)

func (*NilModular) SignCreateObjectApproval

func (*NilModular) SignCreateObjectApproval(context.Context, *storagetypes.MsgCreateObject) ([]byte, error)

func (*NilModular) SignMigrateBucketApproval added in v0.2.3

func (*NilModular) SignMigrateBucketApproval(context.Context, *storagetypes.MsgMigrateBucket) ([]byte, error)

func (*NilModular) SignMigrateGVG added in v0.2.6

func (*NilModular) SignMigrateGVG(ctx context.Context, task *gfsptask.GfSpMigrateGVGTask) ([]byte, error)

func (*NilModular) SignP2PPingMsg

func (*NilModular) SignP2PPingMsg(context.Context, *gfspp2p.GfSpPing) ([]byte, error)

func (*NilModular) SignP2PPongMsg

func (*NilModular) SignP2PPongMsg(context.Context, *gfspp2p.GfSpPong) ([]byte, error)

func (*NilModular) SignReceivePieceTask

func (*NilModular) SignReceivePieceTask(context.Context, task.ReceivePieceTask) ([]byte, error)

func (*NilModular) SignRecoveryPieceTask added in v0.2.3

func (*NilModular) SignRecoveryPieceTask(context.Context, task.RecoveryPieceTask) ([]byte, error)

func (*NilModular) SignReplicatePieceApproval

func (*NilModular) SignReplicatePieceApproval(context.Context, task.ApprovalReplicatePieceTask) ([]byte, error)

func (*NilModular) SignSecondarySPMigrationBucket added in v0.2.3

func (*NilModular) SignSecondarySPMigrationBucket(ctx context.Context, signDoc *storagetypes.SecondarySpMigrationBucketSignDoc) ([]byte, error)

func (*NilModular) SignSecondarySealBls added in v0.2.3

func (*NilModular) SignSecondarySealBls(context.Context, uint64, uint32, [][]byte) ([]byte, error)

func (*NilModular) SignSwapOut added in v0.2.3

func (*NilModular) SignSwapOut(ctx context.Context, swapOut *virtualgrouptypes.MsgSwapOut) ([]byte, error)

func (*NilModular) Start

func (*NilModular) Start(context.Context) error

func (*NilModular) Stop

func (*NilModular) SwapOut added in v0.2.3

func (*NilModular) SwapOut(ctx context.Context, swapOut *virtualgrouptypes.MsgSwapOut) (string, error)

func (*NilModular) UpdateSPPrice added in v0.2.3

func (*NilModular) UpdateSPPrice(ctx context.Context, price *sptypes.MsgUpdateSpStoragePrice) (string, error)

type NullModular

type NullModular struct{}

func (*NullModular) DispatchTask

func (*NullModular) DispatchTask(context.Context, rcmgr.Limit) (task.Task, error)

func (*NullModular) GetAuthNonce

func (*NullModular) GetAuthNonce(ctx context.Context, account string, domain string) (*corespdb.OffChainAuthKey, error)

func (*NullModular) HandleChallengePieceTask

func (*NullModular) HandleChallengePieceTask(context.Context, task.ChallengePieceTask) error

func (*NullModular) HandleCreateBucketApprovalTask

func (*NullModular) HandleCreateBucketApprovalTask(context.Context, task.ApprovalCreateBucketTask) (bool, error)

func (*NullModular) HandleCreateObjectApprovalTask

func (*NullModular) HandleCreateObjectApprovalTask(context.Context, task.ApprovalCreateObjectTask) (bool, error)

func (*NullModular) HandleCreateResumableUploadObjectTask added in v0.2.3

func (*NullModular) HandleCreateResumableUploadObjectTask(context.Context, task.ResumableUploadObjectTask) error

func (*NullModular) HandleCreateUploadObjectTask

func (*NullModular) HandleCreateUploadObjectTask(context.Context, task.UploadObjectTask) error

func (*NullModular) HandleDoneResumableUploadObjectTask added in v0.2.3

func (*NullModular) HandleDoneResumableUploadObjectTask(context.Context, task.ResumableUploadObjectTask) error

func (*NullModular) HandleDoneUploadObjectTask

func (*NullModular) HandleDoneUploadObjectTask(context.Context, task.UploadObjectTask) error

func (*NullModular) HandleDownloadObjectTask

func (*NullModular) HandleDownloadObjectTask(context.Context, task.DownloadObjectTask) error

func (*NullModular) HandleGCMetaTask

func (*NullModular) HandleGCMetaTask(context.Context, task.GCMetaTask) error

func (*NullModular) HandleGCObjectTask

func (*NullModular) HandleGCObjectTask(context.Context, task.GCObjectTask) error

func (*NullModular) HandleGCZombiePieceTask

func (*NullModular) HandleGCZombiePieceTask(context.Context, task.GCZombiePieceTask) error

func (*NullModular) HandleMigrateBucketApprovalTask added in v0.2.3

func (*NullModular) HandleMigrateBucketApprovalTask(context.Context, task.ApprovalMigrateBucketTask) (bool, error)

func (*NullModular) HandleMigrateGVGTask added in v0.2.3

func (*NullModular) HandleMigrateGVGTask(ctx context.Context, gvgTask task.MigrateGVGTask) error

func (*NullModular) HandleReceivePieceTask

func (*NullModular) HandleReceivePieceTask(context.Context, task.ReceivePieceTask) error

func (*NullModular) HandleRecoverPieceTask added in v0.2.3

func (*NullModular) HandleRecoverPieceTask(ctx context.Context, task task.RecoveryPieceTask) error

func (*NullModular) HandleReplicatePieceApproval

func (*NullModular) HandleReplicatePieceApproval(context.Context, task.ApprovalReplicatePieceTask) (bool, error)

func (*NullModular) HandleReplicatePieceTask

func (*NullModular) HandleReplicatePieceTask(context.Context, task.ReplicatePieceTask) error

func (*NullModular) HandleResumableUploadObjectTask added in v0.2.3

func (*NullModular) HandleResumableUploadObjectTask(ctx context.Context, task task.ResumableUploadObjectTask, stream io.Reader) error

func (*NullModular) HandleSealObjectTask

func (*NullModular) HandleSealObjectTask(context.Context, task.SealObjectTask) error

func (*NullModular) HandleUploadObjectTask

func (*NullModular) HandleUploadObjectTask(ctx context.Context, task task.UploadObjectTask, stream io.Reader) error

func (*NullModular) Name

func (*NullModular) Name() string

func (*NullModular) NotifyMigrateSwapOut added in v0.2.3

func (*NullModular) NotifyMigrateSwapOut(context.Context, *virtualgrouptypes.MsgSwapOut) error

func (*NullModular) PickVirtualGroupFamily added in v0.2.3

func (*NullModular) PickVirtualGroupFamily(context.Context, task.ApprovalCreateBucketTask) (uint32, error)

func (*NullModular) PostCreateBucketApproval

func (*NullModular) PostCreateBucketApproval(context.Context, task.ApprovalCreateBucketTask)

func (*NullModular) PostCreateObjectApproval

func (*NullModular) PostCreateObjectApproval(context.Context, task.ApprovalCreateObjectTask)

func (*NullModular) PostMigrateBucketApproval added in v0.2.3

func (*NullModular) PostMigrateBucketApproval(context.Context, task.ApprovalMigrateBucketTask)

func (*NullModular) PostReplicatePieceApproval

func (*NullModular) PostReplicatePieceApproval(context.Context, task.ApprovalReplicatePieceTask)

func (*NullModular) PostResumableUploadObject added in v0.2.3

func (*NullModular) PostResumableUploadObject(ctx context.Context, task task.ResumableUploadObjectTask)

func (*NullModular) PostUploadObject

func (*NullModular) PostUploadObject(ctx context.Context, task task.UploadObjectTask)

func (*NullModular) PreCreateBucketApproval

func (*NullModular) PreCreateBucketApproval(context.Context, task.ApprovalCreateBucketTask) error

func (*NullModular) PreCreateObjectApproval

func (*NullModular) PreCreateObjectApproval(context.Context, task.ApprovalCreateObjectTask) error

func (*NullModular) PreMigrateBucketApproval added in v0.2.3

func (*NullModular) PreMigrateBucketApproval(context.Context, task.ApprovalMigrateBucketTask) error

func (*NullModular) PreReplicatePieceApproval

func (*NullModular) PreReplicatePieceApproval(context.Context, task.ApprovalReplicatePieceTask) error

func (*NullModular) PreResumableUploadObject added in v0.2.3

func (*NullModular) PreResumableUploadObject(ctx context.Context, task task.ResumableUploadObjectTask) error

func (*NullModular) PreUploadObject

func (*NullModular) PreUploadObject(ctx context.Context, task task.UploadObjectTask) error

func (*NullModular) QueryBucketMigrate added in v0.2.3

func (*NullModular) QuerySpExit added in v0.2.3

func (*NullModular) QueryTask

func (*NullModular) QueryTask(context.Context, task.TKey) (task.Task, error)

func (*NullModular) QueryTasks

func (*NullModular) QueryTasks(ctx context.Context, keyPrefix task.TKey) ([]task.Task, error)

func (*NullModular) QueryTasksStats added in v0.2.6

func (m *NullModular) QueryTasksStats(ctx context.Context) (int, int, int, int, int, int)

func (*NullModular) ReleaseResource

func (*NullModular) ReleaseResource(context.Context, rcmgr.ResourceScopeSpan)

func (*NullModular) ReserveResource

func (*NullModular) Start

func (*NullModular) Start(context.Context) error

func (*NullModular) Stop

func (*NullModular) UpdateUserPublicKey

func (*NullModular) UpdateUserPublicKey(ctx context.Context, account string, domain string, currentNonce int32, nonce int32, userPublicKey string, expiryDate int64) (bool, error)

func (*NullModular) VerifyAuthentication

func (*NullModular) VerifyAuthentication(context.Context, AuthOpType, string, string, string) (bool, error)

func (*NullModular) VerifyGNFD1EddsaSignature added in v0.2.4

func (*NullModular) VerifyGNFD1EddsaSignature(ctx context.Context, account string, domain string, offChainSig string, realMsgToSign []byte) (bool, error)

func (*NullModular) VerifyOffChainSignature

func (*NullModular) VerifyOffChainSignature(ctx context.Context, account string, domain string, offChainSig string, realMsgToSign string) (bool, error)

type NullReceiveModular

type NullReceiveModular struct{}

func (*NullReceiveModular) HandleDoneReceivePieceTask

func (*NullReceiveModular) HandleDoneReceivePieceTask(context.Context, task.ReceivePieceTask) ([]byte, error)

func (*NullReceiveModular) HandleReceivePieceTask

func (*NullReceiveModular) HandleReceivePieceTask(context.Context, task.ReceivePieceTask, []byte) error

func (*NullReceiveModular) Name

func (*NullReceiveModular) Name() string

func (*NullReceiveModular) QueryTasks

func (*NullReceiveModular) QueryTasks(ctx context.Context, keyPrefix task.TKey) ([]task.Task, error)

func (*NullReceiveModular) ReleaseResource

func (*NullReceiveModular) ReserveResource

func (*NullReceiveModular) Start

func (*NullReceiveModular) Stop

type P2P

type P2P interface {
	Modular
	// HandleReplicatePieceApproval handles the asking replicate piece approval, it will
	// broadcast the approval to other SPs, waiting the responses. If up to min approved
	// number or max approved number before timeout, it will return the approvals.
	HandleReplicatePieceApproval(ctx context.Context, t task.ApprovalReplicatePieceTask, min, max int32,
		timeout int64) ([]task.ApprovalReplicatePieceTask, error)
	// HandleQueryBootstrap handles the query p2p node bootstrap node info.
	HandleQueryBootstrap(ctx context.Context) ([]string, error)
	// QueryTasks queries replicate piece approval tasks that running on p2p by task sub-key.
	QueryTasks(ctx context.Context, subKey task.TKey) ([]task.Task, error)
}

P2P is an abstract interface to the to do replicate piece approvals between SPs.

type Receiver

type Receiver interface {
	Modular
	// HandleReceivePieceTask stores piece data into secondary SP.
	HandleReceivePieceTask(ctx context.Context, task task.ReceivePieceTask, data []byte) error
	// HandleDoneReceivePieceTask calculates the secondary bls of the object and sign it, returns to the primary
	// SP for sealed object.
	HandleDoneReceivePieceTask(ctx context.Context, task task.ReceivePieceTask) ([]byte, error)
	// QueryTasks queries replicate piece tasks that running on receiver by task sub-key.
	QueryTasks(ctx context.Context, subKey task.TKey) ([]task.Task, error)
}

Receiver is an abstract interface to receive the piece data from primary SP.

type Signer

type Signer interface {
	Modular
	// SignCreateBucketApproval signs the MsgCreateBucket for asking create bucket approval.
	SignCreateBucketApproval(ctx context.Context, bucket *storagetypes.MsgCreateBucket) ([]byte, error)
	// SignMigrateBucketApproval signs the MsgMigrateBucket for asking migrate bucket approval
	SignMigrateBucketApproval(ctx context.Context, bucket *storagetypes.MsgMigrateBucket) ([]byte, error)
	// SignCreateObjectApproval signs the MsgCreateObject for asking create object approval.
	SignCreateObjectApproval(ctx context.Context, task *storagetypes.MsgCreateObject) ([]byte, error)
	// SignReplicatePieceApproval signs the ApprovalReplicatePieceTask for asking replicate pieces to secondary SPs.
	SignReplicatePieceApproval(ctx context.Context, task task.ApprovalReplicatePieceTask) ([]byte, error)
	// SignReceivePieceTask signs the ReceivePieceTask for replicating pieces data between SPs.
	SignReceivePieceTask(ctx context.Context, task task.ReceivePieceTask) ([]byte, error)
	// SignSecondarySealBls signs the secondary bls for sealing object.
	SignSecondarySealBls(ctx context.Context, objectID uint64, gvgId uint32, hash [][]byte) ([]byte, error)
	// SignRecoveryPieceTask signs the RecoveryPieceTask for recovering piece data
	SignRecoveryPieceTask(ctx context.Context, task task.RecoveryPieceTask) ([]byte, error)
	// SignP2PPingMsg signs the ping msg for p2p node probing.
	SignP2PPingMsg(ctx context.Context, ping *gfspp2p.GfSpPing) ([]byte, error)
	// SignP2PPongMsg signs the pong msg for p2p to response ping msg.
	SignP2PPongMsg(ctx context.Context, pong *gfspp2p.GfSpPong) ([]byte, error)
	// SealObject signs the MsgSealObject and broadcast the tx to greenfield.
	SealObject(ctx context.Context, object *storagetypes.MsgSealObject) (string, error)
	// RejectUnSealObject signs the MsgRejectSealObject and broadcast the tx to greenfield.
	RejectUnSealObject(ctx context.Context, object *storagetypes.MsgRejectSealObject) (string, error)
	// DiscontinueBucket signs the MsgDiscontinueBucket and broadcast the tx to greenfield.
	DiscontinueBucket(ctx context.Context, bucket *storagetypes.MsgDiscontinueBucket) (string, error)
	// CreateGlobalVirtualGroup signs the MsgCreateGlobalVirtualGroup and broadcast the tx to greenfield.
	CreateGlobalVirtualGroup(ctx context.Context, gvg *virtualgrouptypes.MsgCreateGlobalVirtualGroup) (string, error)
	// CompleteMigrateBucket signs the MsgCompleteMigrateBucket and broadcast the tx to greenfield.
	CompleteMigrateBucket(ctx context.Context, migrateBucket *storagetypes.MsgCompleteMigrateBucket) (string, error)
	// SignSecondarySPMigrationBucket signs secondary sp bls for bucket migration
	SignSecondarySPMigrationBucket(ctx context.Context, signDoc *storagetypes.SecondarySpMigrationBucketSignDoc) ([]byte, error)
	// SwapOut signs the MsgSwapOut and broadcast the tx to greenfield.
	SwapOut(ctx context.Context, swapOut *virtualgrouptypes.MsgSwapOut) (string, error)
	// SignSwapOut signs the MsgSwapOut for asking swap out approval.
	SignSwapOut(ctx context.Context, swapOut *virtualgrouptypes.MsgSwapOut) ([]byte, error)
	// CompleteSwapOut signs the MsgCompleteSwapOut and broadcast the tx to greenfield.
	CompleteSwapOut(ctx context.Context, completeSwapOut *virtualgrouptypes.MsgCompleteSwapOut) (string, error)
	// SPExit signs the MsgStorageProviderExit and broadcast the tx to greenfield.
	SPExit(ctx context.Context, spExit *virtualgrouptypes.MsgStorageProviderExit) (string, error)
	// CompleteSPExit signs the MsgCompleteStorageProviderExit and broadcast the tx to greenfield.
	CompleteSPExit(ctx context.Context, completeSPExit *virtualgrouptypes.MsgCompleteStorageProviderExit) (string, error)
	// UpdateSPPrice signs the MsgUpdateSpStoragePrice and  broadcast the tx to greenfield.
	UpdateSPPrice(ctx context.Context, price *sptypes.MsgUpdateSpStoragePrice) (string, error)
	// SignMigrateGVG signs the GfSpMigrateGVGTask for migrating piece auth.
	SignMigrateGVG(ctx context.Context, task *gfsptask.GfSpMigrateGVGTask) ([]byte, error)
}

Signer is an abstract interface to handle the signature of SP and on greenfield chain operator. It holds all private keys of one SP. Considering the SP account's sequence number, it must be a singleton.

type TaskExecutor

type TaskExecutor interface {
	Modular
	// AskTask asks the task by remaining limitation from manager module.
	AskTask(ctx context.Context) error
	// HandleReplicatePieceTask handles ReplicatePieceTask that is asked from manager module.
	HandleReplicatePieceTask(ctx context.Context, task task.ReplicatePieceTask)
	// HandleSealObjectTask handles SealObjectTask that is asked from manager module.
	HandleSealObjectTask(ctx context.Context, task task.SealObjectTask)
	// HandleReceivePieceTask handles the ReceivePieceTask that is asked from manager module.
	// It will confirm the piece data that is synced to secondary SP whether has been sealed.
	HandleReceivePieceTask(ctx context.Context, task task.ReceivePieceTask)
	// HandleGCObjectTask handles the GCObjectTask that is asked from manager module.
	HandleGCObjectTask(ctx context.Context, task task.GCObjectTask)
	// HandleGCZombiePieceTask handles the GCZombiePieceTask that is asked from manager module.
	HandleGCZombiePieceTask(ctx context.Context, task task.GCZombiePieceTask)
	// HandleGCMetaTask handles the GCMetaTask that is asked from manager module.
	HandleGCMetaTask(ctx context.Context, task task.GCMetaTask)
	// HandleMigrateGVGTask handles the MigrateGVGTask that is asked from manager module
	HandleMigrateGVGTask(ctx context.Context, gvgTask task.MigrateGVGTask)
	// ReportTask reports the results or status of running task to manager module.
	ReportTask(ctx context.Context, task task.Task) error
}

TaskExecutor is an abstract interface to handle background tasks. It will ask tasks from manager modular, handle tasks and report the results or status to the manager modular It can handle these tasks: ReplicatePieceTask, SealObjectTask, ReceivePieceTask, GCObjectTask, GCZombiePieceTask, GCMetaTask.

type Uploader

type Uploader interface {
	Modular
	// PreUploadObject prepares to handle UploadObject, it can do some checks
	// such as checking for duplicates, if limitation of SP has been reached, etc.
	PreUploadObject(ctx context.Context, task task.UploadObjectTask) error
	// HandleUploadObjectTask handles the UploadObject, store payload data into piece store by data stream.
	HandleUploadObjectTask(ctx context.Context, task task.UploadObjectTask, stream io.Reader) error
	// PostUploadObject is called after HandleUploadObjectTask, it can recycle
	// resources, make statistics and do some other operations.
	PostUploadObject(ctx context.Context, task task.UploadObjectTask)

	// PreResumableUploadObject prepares to handle ResumableUploadObject, it can do some checks
	// such as checking for duplicates, if limitation of SP has been reached, etc.
	PreResumableUploadObject(ctx context.Context, task task.ResumableUploadObjectTask) error
	// HandleResumableUploadObjectTask handles the ResumableUploadObject, store payload data into piece store by data stream.
	HandleResumableUploadObjectTask(ctx context.Context, task task.ResumableUploadObjectTask, stream io.Reader) error
	// PostResumableUploadObject is called after HandleResumableUploadObjectTask, it can recycle
	// resources, statistics and other operations.
	PostResumableUploadObject(ctx context.Context, task task.ResumableUploadObjectTask)

	// QueryTasks queries upload object tasks that running on uploading by task sub-key.
	QueryTasks(ctx context.Context, subKey task.TKey) ([]task.Task, error)
}

Uploader is an abstract interface to handle putting object requests from users' account and store their payload data into primary SP piece store.

Jump to

Keyboard shortcuts

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