spdb

package
v0.2.3-alpha.10 Latest Latest
Warning

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

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

Documentation

Overview

Package spdb is a generated GoMock package.

Index

Constants

View Source
const (
	GatewayBeginReceiveUpload           = "gateway_begin_receive_upload"
	GatewayEndReceiveUpload             = "gateway_end_receive_upload"
	UploaderBeginReceiveData            = "uploader_begin_receive_data"
	UploaderEndReceiveData              = "uploader_end_receive_data"
	ManagerReceiveAndWaitSchedulingTask = "manager_receive_and_wait_scheduling_task"
	ManagerSchedulingTask               = "manager_scheduling_task"
	ExecutorBeginTask                   = "executor_begin_task"
	ExecutorEndTask                     = "executor_end_task"
	ExecutorBeginP2P                    = "executor_begin_p2p"
	ExecutorEndP2P                      = "executor_end_p2p"
	ExecutorBeginReplicateOnePiece      = "executor_begin_replicate_one_piece"
	ExecutorEndReplicateOnePiece        = "executor_end_replicate_one_piece"
	ExecutorBeginReplicateAllPiece      = "executor_begin_replicate_all_piece"
	ExecutorEndReplicateAllPiece        = "executor_end_replicate_all_piece"
	ExecutorBeginDoneReplicatePiece     = "executor_begin_done_replicate_piece"
	ExecutorEndDoneReplicatePiece       = "executor_end_done_replicate_piece"
	ExecutorBeginSealTx                 = "executor_begin_seal_tx"
	ExecutorEndSealTx                   = "executor_end_seal_tx"
	ExecutorBeginConfirmSeal            = "executor_begin_confirm_seal"
	ExecutorEndConfirmSeal              = "executor_end_confirm_seal"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BucketQuota

type BucketQuota struct {
	ReadQuotaSize uint64
}

BucketQuota defines read quota of a bucket.

type BucketTraffic

type BucketTraffic struct {
	BucketID         uint64
	YearMonth        string // YearMonth is traffic's YearMonth, format "2023-02".
	BucketName       string
	ReadConsumedSize uint64
	ReadQuotaSize    uint64
	ModifyTime       int64
}

BucketTraffic is record traffic by year and month.

type GCObjectMeta

type GCObjectMeta struct {
	TaskKey             string
	StartBlockHeight    uint64
	EndBlockHeight      uint64
	CurrentBlockHeight  uint64
	LastDeletedObjectID uint64
}

GCObjectMeta defines the gc object range progress info.

type GCObjectProgressDB

type GCObjectProgressDB interface {
	// InsertGCObjectProgress inserts a new gc object progress.
	InsertGCObjectProgress(taskKey string, gcMeta *GCObjectMeta) error
	// DeleteGCObjectProgress deletes the gc object progress.
	DeleteGCObjectProgress(taskKey string) error
	// UpdateGCObjectProgress updates the gc object progress.
	UpdateGCObjectProgress(gcMeta *GCObjectMeta) error
	// GetGCMetasToGC queries the latest gc meta to continue gc.
	// It is only used in startup.
	GetGCMetasToGC(limit int) ([]*GCObjectMeta, error)
}

GCObjectProgressDB interface which records gc object related progress.

type IntegrityMeta

type IntegrityMeta struct {
	ObjectID          uint64
	IntegrityChecksum []byte
	PieceChecksumList [][]byte
}

IntegrityMeta defines the payload integrity hash and piece checksum with objectID.

type MigrateDB added in v0.2.3

type MigrateDB interface {
	// UpdateSPExitSubscribeProgress includes insert and update.
	UpdateSPExitSubscribeProgress(blockHeight uint64) error
	// QuerySPExitSubscribeProgress returns blockHeight which is called at startup.
	QuerySPExitSubscribeProgress() (uint64, error)
	// UpdateSwapOutSubscribeProgress includes insert and update.
	UpdateSwapOutSubscribeProgress(blockHeight uint64) error
	// QuerySwapOutSubscribeProgress returns blockHeight which is called at startup.
	QuerySwapOutSubscribeProgress() (uint64, error)
	// UpdateBucketMigrateSubscribeProgress includes insert and update.
	UpdateBucketMigrateSubscribeProgress(blockHeight uint64) error
	// QueryBucketMigrateSubscribeProgress returns blockHeight which is called at startup.
	QueryBucketMigrateSubscribeProgress() (uint64, error)

	// InsertMigrateGVGUnit inserts a new gvg migrate unit.
	InsertMigrateGVGUnit(meta *MigrateGVGUnitMeta) error
	// DeleteMigrateGVGUnit deletes the gvg migrate unit.
	DeleteMigrateGVGUnit(meta *MigrateGVGUnitMeta) error

	// UpdateMigrateGVGUnitStatus updates gvg unit status.
	UpdateMigrateGVGUnitStatus(migrateKey string, migrateStatus int) error
	// UpdateMigrateGVGUnitLastMigrateObjectID updates gvg unit LastMigrateObjectID
	UpdateMigrateGVGUnitLastMigrateObjectID(migrateKey string, lastMigrateObjectID uint64) error

	// QueryMigrateGVGUnit returns the gvg migrate unit info.
	QueryMigrateGVGUnit(migrateKey string) (*MigrateGVGUnitMeta, error)
	// ListMigrateGVGUnitsByFamilyID is used to load at src sp startup(sp exit).
	ListMigrateGVGUnitsByFamilyID(familyID uint32, srcSP uint32) ([]*MigrateGVGUnitMeta, error)
	// ListConflictedMigrateGVGUnitsByFamilyID is used to load at src sp startup(sp exit).
	ListConflictedMigrateGVGUnitsByFamilyID(familyID uint32) ([]*MigrateGVGUnitMeta, error)
	// ListRemotedMigrateGVGUnits is used to load at dest sp startup(sp exit).
	ListRemotedMigrateGVGUnits() ([]*MigrateGVGUnitMeta, error)
	// ListMigrateGVGUnitsByBucketID is used to load at dest sp startup(bucket migrate).
	ListMigrateGVGUnitsByBucketID(bucketID uint64) ([]*MigrateGVGUnitMeta, error)
}

MigrateDB is used to support sp exit and bucket migrate.

type MigrateGVGUnitMeta added in v0.2.3

type MigrateGVGUnitMeta struct {
	MigrateGVGKey        string // as primary key
	GlobalVirtualGroupID uint32 // is used by sp exit/bucket migrate
	VirtualGroupFamilyID uint32 // is used by sp exit
	RedundancyIndex      int32  // is used by sp exit
	BucketID             uint64 // is used by bucket migrate
	IsRemoted            bool   // is used by sp exit
	IsSecondary          bool   // is used by sp exit
	IsConflicted         bool   // is used by sp exit
	SrcSPID              uint32
	DestSPID             uint32
	LastMigratedObjectID uint64
	MigrateStatus        int // scheduler assign unit status.
	CheckStatus          int //  src sp check dest sp's migrate unit.
}

MigrateGVGUnitMeta is used to record migrate type/meta/status/progress.

type MockGCObjectProgressDB

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

MockGCObjectProgressDB is a mock of GCObjectProgressDB interface.

func NewMockGCObjectProgressDB

func NewMockGCObjectProgressDB(ctrl *gomock.Controller) *MockGCObjectProgressDB

NewMockGCObjectProgressDB creates a new mock instance.

func (*MockGCObjectProgressDB) DeleteGCObjectProgress

func (m *MockGCObjectProgressDB) DeleteGCObjectProgress(taskKey string) error

DeleteGCObjectProgress mocks base method.

func (*MockGCObjectProgressDB) EXPECT

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

func (*MockGCObjectProgressDB) GetGCMetasToGC added in v0.2.3

func (m *MockGCObjectProgressDB) GetGCMetasToGC(limit int) ([]*GCObjectMeta, error)

GetGCMetasToGC mocks base method.

func (*MockGCObjectProgressDB) InsertGCObjectProgress added in v0.2.3

func (m *MockGCObjectProgressDB) InsertGCObjectProgress(taskKey string, gcMeta *GCObjectMeta) error

InsertGCObjectProgress mocks base method.

func (*MockGCObjectProgressDB) UpdateGCObjectProgress added in v0.2.3

func (m *MockGCObjectProgressDB) UpdateGCObjectProgress(gcMeta *GCObjectMeta) error

UpdateGCObjectProgress mocks base method.

type MockGCObjectProgressDBMockRecorder

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

MockGCObjectProgressDBMockRecorder is the mock recorder for MockGCObjectProgressDB.

func (*MockGCObjectProgressDBMockRecorder) DeleteGCObjectProgress

func (mr *MockGCObjectProgressDBMockRecorder) DeleteGCObjectProgress(taskKey interface{}) *gomock.Call

DeleteGCObjectProgress indicates an expected call of DeleteGCObjectProgress.

func (*MockGCObjectProgressDBMockRecorder) GetGCMetasToGC added in v0.2.3

func (mr *MockGCObjectProgressDBMockRecorder) GetGCMetasToGC(limit interface{}) *gomock.Call

GetGCMetasToGC indicates an expected call of GetGCMetasToGC.

func (*MockGCObjectProgressDBMockRecorder) InsertGCObjectProgress added in v0.2.3

func (mr *MockGCObjectProgressDBMockRecorder) InsertGCObjectProgress(taskKey, gcMeta interface{}) *gomock.Call

InsertGCObjectProgress indicates an expected call of InsertGCObjectProgress.

func (*MockGCObjectProgressDBMockRecorder) UpdateGCObjectProgress added in v0.2.3

func (mr *MockGCObjectProgressDBMockRecorder) UpdateGCObjectProgress(gcMeta interface{}) *gomock.Call

UpdateGCObjectProgress indicates an expected call of UpdateGCObjectProgress.

type MockOffChainAuthKeyDB

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

MockOffChainAuthKeyDB is a mock of OffChainAuthKeyDB interface.

func NewMockOffChainAuthKeyDB

func NewMockOffChainAuthKeyDB(ctrl *gomock.Controller) *MockOffChainAuthKeyDB

NewMockOffChainAuthKeyDB creates a new mock instance.

func (*MockOffChainAuthKeyDB) EXPECT

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

func (*MockOffChainAuthKeyDB) GetAuthKey

func (m *MockOffChainAuthKeyDB) GetAuthKey(userAddress, domain string) (*OffChainAuthKey, error)

GetAuthKey mocks base method.

func (*MockOffChainAuthKeyDB) InsertAuthKey

func (m *MockOffChainAuthKeyDB) InsertAuthKey(newRecord *OffChainAuthKey) error

InsertAuthKey mocks base method.

func (*MockOffChainAuthKeyDB) UpdateAuthKey

func (m *MockOffChainAuthKeyDB) UpdateAuthKey(userAddress, domain string, oldNonce, newNonce int32, newPublicKey string, newExpiryDate time.Time) error

UpdateAuthKey mocks base method.

type MockOffChainAuthKeyDBMockRecorder

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

MockOffChainAuthKeyDBMockRecorder is the mock recorder for MockOffChainAuthKeyDB.

func (*MockOffChainAuthKeyDBMockRecorder) GetAuthKey

func (mr *MockOffChainAuthKeyDBMockRecorder) GetAuthKey(userAddress, domain interface{}) *gomock.Call

GetAuthKey indicates an expected call of GetAuthKey.

func (*MockOffChainAuthKeyDBMockRecorder) InsertAuthKey

func (mr *MockOffChainAuthKeyDBMockRecorder) InsertAuthKey(newRecord interface{}) *gomock.Call

InsertAuthKey indicates an expected call of InsertAuthKey.

func (*MockOffChainAuthKeyDBMockRecorder) UpdateAuthKey

func (mr *MockOffChainAuthKeyDBMockRecorder) UpdateAuthKey(userAddress, domain, oldNonce, newNonce, newPublicKey, newExpiryDate interface{}) *gomock.Call

UpdateAuthKey indicates an expected call of UpdateAuthKey.

type MockSPDB

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

MockSPDB is a mock of SPDB interface.

func NewMockSPDB

func NewMockSPDB(ctrl *gomock.Controller) *MockSPDB

NewMockSPDB creates a new mock instance.

func (*MockSPDB) CheckQuotaAndAddReadRecord

func (m *MockSPDB) CheckQuotaAndAddReadRecord(record *ReadRecord, quota *BucketQuota) error

CheckQuotaAndAddReadRecord mocks base method.

func (*MockSPDB) DeleteAllReplicatePieceChecksum

func (m *MockSPDB) DeleteAllReplicatePieceChecksum(objectID uint64, replicateIdx, pieceCount uint32) error

DeleteAllReplicatePieceChecksum mocks base method.

func (*MockSPDB) DeleteGCObjectProgress

func (m *MockSPDB) DeleteGCObjectProgress(taskKey string) error

DeleteGCObjectProgress mocks base method.

func (*MockSPDB) DeleteObjectIntegrity

func (m *MockSPDB) DeleteObjectIntegrity(objectID uint64) error

DeleteObjectIntegrity mocks base method.

func (*MockSPDB) DeleteUploadProgress added in v0.2.3

func (m *MockSPDB) DeleteUploadProgress(objectID uint64) error

DeleteUploadProgress mocks base method.

func (*MockSPDB) EXPECT

func (m *MockSPDB) EXPECT() *MockSPDBMockRecorder

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

func (*MockSPDB) FetchAllSp

func (m *MockSPDB) FetchAllSp(status ...types0.Status) ([]*types0.StorageProvider, error)

FetchAllSp mocks base method.

func (*MockSPDB) FetchAllSpWithoutOwnSp

func (m *MockSPDB) FetchAllSpWithoutOwnSp(status ...types0.Status) ([]*types0.StorageProvider, error)

FetchAllSpWithoutOwnSp mocks base method.

func (*MockSPDB) GetAllReplicatePieceChecksum

func (m *MockSPDB) GetAllReplicatePieceChecksum(objectID uint64, replicateIdx, pieceCount uint32) ([][]byte, error)

GetAllReplicatePieceChecksum mocks base method.

func (*MockSPDB) GetAuthKey

func (m *MockSPDB) GetAuthKey(userAddress, domain string) (*OffChainAuthKey, error)

GetAuthKey mocks base method.

func (*MockSPDB) GetBucketReadRecord

func (m *MockSPDB) GetBucketReadRecord(bucketID uint64, timeRange *TrafficTimeRange) ([]*ReadRecord, error)

GetBucketReadRecord mocks base method.

func (*MockSPDB) GetBucketTraffic

func (m *MockSPDB) GetBucketTraffic(bucketID uint64, yearMonth string) (*BucketTraffic, error)

GetBucketTraffic mocks base method.

func (*MockSPDB) GetGCMetasToGC added in v0.2.3

func (m *MockSPDB) GetGCMetasToGC(limit int) ([]*GCObjectMeta, error)

GetGCMetasToGC mocks base method.

func (*MockSPDB) GetObjectIntegrity

func (m *MockSPDB) GetObjectIntegrity(objectID uint64) (*IntegrityMeta, error)

GetObjectIntegrity mocks base method.

func (*MockSPDB) GetObjectReadRecord

func (m *MockSPDB) GetObjectReadRecord(objectID uint64, timeRange *TrafficTimeRange) ([]*ReadRecord, error)

GetObjectReadRecord mocks base method.

func (*MockSPDB) GetOwnSpInfo

func (m *MockSPDB) GetOwnSpInfo() (*types0.StorageProvider, error)

GetOwnSpInfo mocks base method.

func (*MockSPDB) GetReadRecord

func (m *MockSPDB) GetReadRecord(timeRange *TrafficTimeRange) ([]*ReadRecord, error)

GetReadRecord mocks base method.

func (*MockSPDB) GetSpByAddress

func (m *MockSPDB) GetSpByAddress(address string, addressType SpAddressType) (*types0.StorageProvider, error)

GetSpByAddress mocks base method.

func (*MockSPDB) GetSpByEndpoint

func (m *MockSPDB) GetSpByEndpoint(endpoint string) (*types0.StorageProvider, error)

GetSpByEndpoint mocks base method.

func (*MockSPDB) GetUploadMetasToReplicate added in v0.2.3

func (m *MockSPDB) GetUploadMetasToReplicate(limit int) ([]*UploadObjectMeta, error)

GetUploadMetasToReplicate mocks base method.

func (*MockSPDB) GetUploadMetasToSeal added in v0.2.3

func (m *MockSPDB) GetUploadMetasToSeal(limit int) ([]*UploadObjectMeta, error)

GetUploadMetasToSeal mocks base method.

func (*MockSPDB) GetUploadState added in v0.2.3

func (m *MockSPDB) GetUploadState(objectID uint64) (types.TaskState, error)

GetUploadState mocks base method.

func (*MockSPDB) GetUserReadRecord

func (m *MockSPDB) GetUserReadRecord(userAddress string, timeRange *TrafficTimeRange) ([]*ReadRecord, error)

GetUserReadRecord mocks base method.

func (*MockSPDB) InsertAuthKey

func (m *MockSPDB) InsertAuthKey(newRecord *OffChainAuthKey) error

InsertAuthKey mocks base method.

func (*MockSPDB) InsertGCObjectProgress added in v0.2.3

func (m *MockSPDB) InsertGCObjectProgress(taskKey string, gcMeta *GCObjectMeta) error

InsertGCObjectProgress mocks base method.

func (*MockSPDB) InsertUploadProgress added in v0.2.3

func (m *MockSPDB) InsertUploadProgress(objectID uint64) error

InsertUploadProgress mocks base method.

func (*MockSPDB) SetObjectIntegrity

func (m *MockSPDB) SetObjectIntegrity(integrity *IntegrityMeta) error

SetObjectIntegrity mocks base method.

func (*MockSPDB) SetOwnSpInfo

func (m *MockSPDB) SetOwnSpInfo(sp *types0.StorageProvider) error

SetOwnSpInfo mocks base method.

func (*MockSPDB) SetReplicatePieceChecksum

func (m *MockSPDB) SetReplicatePieceChecksum(objectID uint64, replicateIdx, pieceIdx uint32, checksum []byte) error

SetReplicatePieceChecksum mocks base method.

func (*MockSPDB) UpdateAllSp

func (m *MockSPDB) UpdateAllSp(spList []*types0.StorageProvider) error

UpdateAllSp mocks base method.

func (*MockSPDB) UpdateAuthKey

func (m *MockSPDB) UpdateAuthKey(userAddress, domain string, oldNonce, newNonce int32, newPublicKey string, newExpiryDate time.Time) error

UpdateAuthKey mocks base method.

func (*MockSPDB) UpdateGCObjectProgress added in v0.2.3

func (m *MockSPDB) UpdateGCObjectProgress(gcMeta *GCObjectMeta) error

UpdateGCObjectProgress mocks base method.

func (*MockSPDB) UpdateUploadProgress

func (m *MockSPDB) UpdateUploadProgress(uploadMeta *UploadObjectMeta) error

UpdateUploadProgress mocks base method.

type MockSPDBMockRecorder

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

MockSPDBMockRecorder is the mock recorder for MockSPDB.

func (*MockSPDBMockRecorder) CheckQuotaAndAddReadRecord

func (mr *MockSPDBMockRecorder) CheckQuotaAndAddReadRecord(record, quota interface{}) *gomock.Call

CheckQuotaAndAddReadRecord indicates an expected call of CheckQuotaAndAddReadRecord.

func (*MockSPDBMockRecorder) DeleteAllReplicatePieceChecksum

func (mr *MockSPDBMockRecorder) DeleteAllReplicatePieceChecksum(objectID, replicateIdx, pieceCount interface{}) *gomock.Call

DeleteAllReplicatePieceChecksum indicates an expected call of DeleteAllReplicatePieceChecksum.

func (*MockSPDBMockRecorder) DeleteGCObjectProgress

func (mr *MockSPDBMockRecorder) DeleteGCObjectProgress(taskKey interface{}) *gomock.Call

DeleteGCObjectProgress indicates an expected call of DeleteGCObjectProgress.

func (*MockSPDBMockRecorder) DeleteObjectIntegrity

func (mr *MockSPDBMockRecorder) DeleteObjectIntegrity(objectID interface{}) *gomock.Call

DeleteObjectIntegrity indicates an expected call of DeleteObjectIntegrity.

func (*MockSPDBMockRecorder) DeleteUploadProgress added in v0.2.3

func (mr *MockSPDBMockRecorder) DeleteUploadProgress(objectID interface{}) *gomock.Call

DeleteUploadProgress indicates an expected call of DeleteUploadProgress.

func (*MockSPDBMockRecorder) FetchAllSp

func (mr *MockSPDBMockRecorder) FetchAllSp(status ...interface{}) *gomock.Call

FetchAllSp indicates an expected call of FetchAllSp.

func (*MockSPDBMockRecorder) FetchAllSpWithoutOwnSp

func (mr *MockSPDBMockRecorder) FetchAllSpWithoutOwnSp(status ...interface{}) *gomock.Call

FetchAllSpWithoutOwnSp indicates an expected call of FetchAllSpWithoutOwnSp.

func (*MockSPDBMockRecorder) GetAllReplicatePieceChecksum

func (mr *MockSPDBMockRecorder) GetAllReplicatePieceChecksum(objectID, replicateIdx, pieceCount interface{}) *gomock.Call

GetAllReplicatePieceChecksum indicates an expected call of GetAllReplicatePieceChecksum.

func (*MockSPDBMockRecorder) GetAuthKey

func (mr *MockSPDBMockRecorder) GetAuthKey(userAddress, domain interface{}) *gomock.Call

GetAuthKey indicates an expected call of GetAuthKey.

func (*MockSPDBMockRecorder) GetBucketReadRecord

func (mr *MockSPDBMockRecorder) GetBucketReadRecord(bucketID, timeRange interface{}) *gomock.Call

GetBucketReadRecord indicates an expected call of GetBucketReadRecord.

func (*MockSPDBMockRecorder) GetBucketTraffic

func (mr *MockSPDBMockRecorder) GetBucketTraffic(bucketID, yearMonth interface{}) *gomock.Call

GetBucketTraffic indicates an expected call of GetBucketTraffic.

func (*MockSPDBMockRecorder) GetGCMetasToGC added in v0.2.3

func (mr *MockSPDBMockRecorder) GetGCMetasToGC(limit interface{}) *gomock.Call

GetGCMetasToGC indicates an expected call of GetGCMetasToGC.

func (*MockSPDBMockRecorder) GetObjectIntegrity

func (mr *MockSPDBMockRecorder) GetObjectIntegrity(objectID interface{}) *gomock.Call

GetObjectIntegrity indicates an expected call of GetObjectIntegrity.

func (*MockSPDBMockRecorder) GetObjectReadRecord

func (mr *MockSPDBMockRecorder) GetObjectReadRecord(objectID, timeRange interface{}) *gomock.Call

GetObjectReadRecord indicates an expected call of GetObjectReadRecord.

func (*MockSPDBMockRecorder) GetOwnSpInfo

func (mr *MockSPDBMockRecorder) GetOwnSpInfo() *gomock.Call

GetOwnSpInfo indicates an expected call of GetOwnSpInfo.

func (*MockSPDBMockRecorder) GetReadRecord

func (mr *MockSPDBMockRecorder) GetReadRecord(timeRange interface{}) *gomock.Call

GetReadRecord indicates an expected call of GetReadRecord.

func (*MockSPDBMockRecorder) GetSpByAddress

func (mr *MockSPDBMockRecorder) GetSpByAddress(address, addressType interface{}) *gomock.Call

GetSpByAddress indicates an expected call of GetSpByAddress.

func (*MockSPDBMockRecorder) GetSpByEndpoint

func (mr *MockSPDBMockRecorder) GetSpByEndpoint(endpoint interface{}) *gomock.Call

GetSpByEndpoint indicates an expected call of GetSpByEndpoint.

func (*MockSPDBMockRecorder) GetUploadMetasToReplicate added in v0.2.3

func (mr *MockSPDBMockRecorder) GetUploadMetasToReplicate(limit interface{}) *gomock.Call

GetUploadMetasToReplicate indicates an expected call of GetUploadMetasToReplicate.

func (*MockSPDBMockRecorder) GetUploadMetasToSeal added in v0.2.3

func (mr *MockSPDBMockRecorder) GetUploadMetasToSeal(limit interface{}) *gomock.Call

GetUploadMetasToSeal indicates an expected call of GetUploadMetasToSeal.

func (*MockSPDBMockRecorder) GetUploadState added in v0.2.3

func (mr *MockSPDBMockRecorder) GetUploadState(objectID interface{}) *gomock.Call

GetUploadState indicates an expected call of GetUploadState.

func (*MockSPDBMockRecorder) GetUserReadRecord

func (mr *MockSPDBMockRecorder) GetUserReadRecord(userAddress, timeRange interface{}) *gomock.Call

GetUserReadRecord indicates an expected call of GetUserReadRecord.

func (*MockSPDBMockRecorder) InsertAuthKey

func (mr *MockSPDBMockRecorder) InsertAuthKey(newRecord interface{}) *gomock.Call

InsertAuthKey indicates an expected call of InsertAuthKey.

func (*MockSPDBMockRecorder) InsertGCObjectProgress added in v0.2.3

func (mr *MockSPDBMockRecorder) InsertGCObjectProgress(taskKey, gcMeta interface{}) *gomock.Call

InsertGCObjectProgress indicates an expected call of InsertGCObjectProgress.

func (*MockSPDBMockRecorder) InsertUploadProgress added in v0.2.3

func (mr *MockSPDBMockRecorder) InsertUploadProgress(objectID interface{}) *gomock.Call

InsertUploadProgress indicates an expected call of InsertUploadProgress.

func (*MockSPDBMockRecorder) SetObjectIntegrity

func (mr *MockSPDBMockRecorder) SetObjectIntegrity(integrity interface{}) *gomock.Call

SetObjectIntegrity indicates an expected call of SetObjectIntegrity.

func (*MockSPDBMockRecorder) SetOwnSpInfo

func (mr *MockSPDBMockRecorder) SetOwnSpInfo(sp interface{}) *gomock.Call

SetOwnSpInfo indicates an expected call of SetOwnSpInfo.

func (*MockSPDBMockRecorder) SetReplicatePieceChecksum

func (mr *MockSPDBMockRecorder) SetReplicatePieceChecksum(objectID, replicateIdx, pieceIdx, checksum interface{}) *gomock.Call

SetReplicatePieceChecksum indicates an expected call of SetReplicatePieceChecksum.

func (*MockSPDBMockRecorder) UpdateAllSp

func (mr *MockSPDBMockRecorder) UpdateAllSp(spList interface{}) *gomock.Call

UpdateAllSp indicates an expected call of UpdateAllSp.

func (*MockSPDBMockRecorder) UpdateAuthKey

func (mr *MockSPDBMockRecorder) UpdateAuthKey(userAddress, domain, oldNonce, newNonce, newPublicKey, newExpiryDate interface{}) *gomock.Call

UpdateAuthKey indicates an expected call of UpdateAuthKey.

func (*MockSPDBMockRecorder) UpdateGCObjectProgress added in v0.2.3

func (mr *MockSPDBMockRecorder) UpdateGCObjectProgress(gcMeta interface{}) *gomock.Call

UpdateGCObjectProgress indicates an expected call of UpdateGCObjectProgress.

func (*MockSPDBMockRecorder) UpdateUploadProgress

func (mr *MockSPDBMockRecorder) UpdateUploadProgress(uploadMeta interface{}) *gomock.Call

UpdateUploadProgress indicates an expected call of UpdateUploadProgress.

type MockSPInfoDB

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

MockSPInfoDB is a mock of SPInfoDB interface.

func NewMockSPInfoDB

func NewMockSPInfoDB(ctrl *gomock.Controller) *MockSPInfoDB

NewMockSPInfoDB creates a new mock instance.

func (*MockSPInfoDB) EXPECT

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

func (*MockSPInfoDB) FetchAllSp

func (m *MockSPInfoDB) FetchAllSp(status ...types0.Status) ([]*types0.StorageProvider, error)

FetchAllSp mocks base method.

func (*MockSPInfoDB) FetchAllSpWithoutOwnSp

func (m *MockSPInfoDB) FetchAllSpWithoutOwnSp(status ...types0.Status) ([]*types0.StorageProvider, error)

FetchAllSpWithoutOwnSp mocks base method.

func (*MockSPInfoDB) GetOwnSpInfo

func (m *MockSPInfoDB) GetOwnSpInfo() (*types0.StorageProvider, error)

GetOwnSpInfo mocks base method.

func (*MockSPInfoDB) GetSpByAddress

func (m *MockSPInfoDB) GetSpByAddress(address string, addressType SpAddressType) (*types0.StorageProvider, error)

GetSpByAddress mocks base method.

func (*MockSPInfoDB) GetSpByEndpoint

func (m *MockSPInfoDB) GetSpByEndpoint(endpoint string) (*types0.StorageProvider, error)

GetSpByEndpoint mocks base method.

func (*MockSPInfoDB) SetOwnSpInfo

func (m *MockSPInfoDB) SetOwnSpInfo(sp *types0.StorageProvider) error

SetOwnSpInfo mocks base method.

func (*MockSPInfoDB) UpdateAllSp

func (m *MockSPInfoDB) UpdateAllSp(spList []*types0.StorageProvider) error

UpdateAllSp mocks base method.

type MockSPInfoDBMockRecorder

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

MockSPInfoDBMockRecorder is the mock recorder for MockSPInfoDB.

func (*MockSPInfoDBMockRecorder) FetchAllSp

func (mr *MockSPInfoDBMockRecorder) FetchAllSp(status ...interface{}) *gomock.Call

FetchAllSp indicates an expected call of FetchAllSp.

func (*MockSPInfoDBMockRecorder) FetchAllSpWithoutOwnSp

func (mr *MockSPInfoDBMockRecorder) FetchAllSpWithoutOwnSp(status ...interface{}) *gomock.Call

FetchAllSpWithoutOwnSp indicates an expected call of FetchAllSpWithoutOwnSp.

func (*MockSPInfoDBMockRecorder) GetOwnSpInfo

func (mr *MockSPInfoDBMockRecorder) GetOwnSpInfo() *gomock.Call

GetOwnSpInfo indicates an expected call of GetOwnSpInfo.

func (*MockSPInfoDBMockRecorder) GetSpByAddress

func (mr *MockSPInfoDBMockRecorder) GetSpByAddress(address, addressType interface{}) *gomock.Call

GetSpByAddress indicates an expected call of GetSpByAddress.

func (*MockSPInfoDBMockRecorder) GetSpByEndpoint

func (mr *MockSPInfoDBMockRecorder) GetSpByEndpoint(endpoint interface{}) *gomock.Call

GetSpByEndpoint indicates an expected call of GetSpByEndpoint.

func (*MockSPInfoDBMockRecorder) SetOwnSpInfo

func (mr *MockSPInfoDBMockRecorder) SetOwnSpInfo(sp interface{}) *gomock.Call

SetOwnSpInfo indicates an expected call of SetOwnSpInfo.

func (*MockSPInfoDBMockRecorder) UpdateAllSp

func (mr *MockSPInfoDBMockRecorder) UpdateAllSp(spList interface{}) *gomock.Call

UpdateAllSp indicates an expected call of UpdateAllSp.

type MockSignatureDB added in v0.2.3

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

MockSignatureDB is a mock of SignatureDB interface.

func NewMockSignatureDB added in v0.2.3

func NewMockSignatureDB(ctrl *gomock.Controller) *MockSignatureDB

NewMockSignatureDB creates a new mock instance.

func (*MockSignatureDB) DeleteAllReplicatePieceChecksum added in v0.2.3

func (m *MockSignatureDB) DeleteAllReplicatePieceChecksum(objectID uint64, replicateIdx, pieceCount uint32) error

DeleteAllReplicatePieceChecksum mocks base method.

func (*MockSignatureDB) DeleteObjectIntegrity added in v0.2.3

func (m *MockSignatureDB) DeleteObjectIntegrity(objectID uint64) error

DeleteObjectIntegrity mocks base method.

func (*MockSignatureDB) EXPECT added in v0.2.3

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

func (*MockSignatureDB) GetAllReplicatePieceChecksum added in v0.2.3

func (m *MockSignatureDB) GetAllReplicatePieceChecksum(objectID uint64, replicateIdx, pieceCount uint32) ([][]byte, error)

GetAllReplicatePieceChecksum mocks base method.

func (*MockSignatureDB) GetObjectIntegrity added in v0.2.3

func (m *MockSignatureDB) GetObjectIntegrity(objectID uint64) (*IntegrityMeta, error)

GetObjectIntegrity mocks base method.

func (*MockSignatureDB) SetObjectIntegrity added in v0.2.3

func (m *MockSignatureDB) SetObjectIntegrity(integrity *IntegrityMeta) error

SetObjectIntegrity mocks base method.

func (*MockSignatureDB) SetReplicatePieceChecksum added in v0.2.3

func (m *MockSignatureDB) SetReplicatePieceChecksum(objectID uint64, replicateIdx, pieceIdx uint32, checksum []byte) error

SetReplicatePieceChecksum mocks base method.

type MockSignatureDBMockRecorder added in v0.2.3

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

MockSignatureDBMockRecorder is the mock recorder for MockSignatureDB.

func (*MockSignatureDBMockRecorder) DeleteAllReplicatePieceChecksum added in v0.2.3

func (mr *MockSignatureDBMockRecorder) DeleteAllReplicatePieceChecksum(objectID, replicateIdx, pieceCount interface{}) *gomock.Call

DeleteAllReplicatePieceChecksum indicates an expected call of DeleteAllReplicatePieceChecksum.

func (*MockSignatureDBMockRecorder) DeleteObjectIntegrity added in v0.2.3

func (mr *MockSignatureDBMockRecorder) DeleteObjectIntegrity(objectID interface{}) *gomock.Call

DeleteObjectIntegrity indicates an expected call of DeleteObjectIntegrity.

func (*MockSignatureDBMockRecorder) GetAllReplicatePieceChecksum added in v0.2.3

func (mr *MockSignatureDBMockRecorder) GetAllReplicatePieceChecksum(objectID, replicateIdx, pieceCount interface{}) *gomock.Call

GetAllReplicatePieceChecksum indicates an expected call of GetAllReplicatePieceChecksum.

func (*MockSignatureDBMockRecorder) GetObjectIntegrity added in v0.2.3

func (mr *MockSignatureDBMockRecorder) GetObjectIntegrity(objectID interface{}) *gomock.Call

GetObjectIntegrity indicates an expected call of GetObjectIntegrity.

func (*MockSignatureDBMockRecorder) SetObjectIntegrity added in v0.2.3

func (mr *MockSignatureDBMockRecorder) SetObjectIntegrity(integrity interface{}) *gomock.Call

SetObjectIntegrity indicates an expected call of SetObjectIntegrity.

func (*MockSignatureDBMockRecorder) SetReplicatePieceChecksum added in v0.2.3

func (mr *MockSignatureDBMockRecorder) SetReplicatePieceChecksum(objectID, replicateIdx, pieceIdx, checksum interface{}) *gomock.Call

SetReplicatePieceChecksum indicates an expected call of SetReplicatePieceChecksum.

type MockTrafficDB

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

MockTrafficDB is a mock of TrafficDB interface.

func NewMockTrafficDB

func NewMockTrafficDB(ctrl *gomock.Controller) *MockTrafficDB

NewMockTrafficDB creates a new mock instance.

func (*MockTrafficDB) CheckQuotaAndAddReadRecord

func (m *MockTrafficDB) CheckQuotaAndAddReadRecord(record *ReadRecord, quota *BucketQuota) error

CheckQuotaAndAddReadRecord mocks base method.

func (*MockTrafficDB) EXPECT

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

func (*MockTrafficDB) GetBucketReadRecord

func (m *MockTrafficDB) GetBucketReadRecord(bucketID uint64, timeRange *TrafficTimeRange) ([]*ReadRecord, error)

GetBucketReadRecord mocks base method.

func (*MockTrafficDB) GetBucketTraffic

func (m *MockTrafficDB) GetBucketTraffic(bucketID uint64, yearMonth string) (*BucketTraffic, error)

GetBucketTraffic mocks base method.

func (*MockTrafficDB) GetObjectReadRecord

func (m *MockTrafficDB) GetObjectReadRecord(objectID uint64, timeRange *TrafficTimeRange) ([]*ReadRecord, error)

GetObjectReadRecord mocks base method.

func (*MockTrafficDB) GetReadRecord

func (m *MockTrafficDB) GetReadRecord(timeRange *TrafficTimeRange) ([]*ReadRecord, error)

GetReadRecord mocks base method.

func (*MockTrafficDB) GetUserReadRecord

func (m *MockTrafficDB) GetUserReadRecord(userAddress string, timeRange *TrafficTimeRange) ([]*ReadRecord, error)

GetUserReadRecord mocks base method.

type MockTrafficDBMockRecorder

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

MockTrafficDBMockRecorder is the mock recorder for MockTrafficDB.

func (*MockTrafficDBMockRecorder) CheckQuotaAndAddReadRecord

func (mr *MockTrafficDBMockRecorder) CheckQuotaAndAddReadRecord(record, quota interface{}) *gomock.Call

CheckQuotaAndAddReadRecord indicates an expected call of CheckQuotaAndAddReadRecord.

func (*MockTrafficDBMockRecorder) GetBucketReadRecord

func (mr *MockTrafficDBMockRecorder) GetBucketReadRecord(bucketID, timeRange interface{}) *gomock.Call

GetBucketReadRecord indicates an expected call of GetBucketReadRecord.

func (*MockTrafficDBMockRecorder) GetBucketTraffic

func (mr *MockTrafficDBMockRecorder) GetBucketTraffic(bucketID, yearMonth interface{}) *gomock.Call

GetBucketTraffic indicates an expected call of GetBucketTraffic.

func (*MockTrafficDBMockRecorder) GetObjectReadRecord

func (mr *MockTrafficDBMockRecorder) GetObjectReadRecord(objectID, timeRange interface{}) *gomock.Call

GetObjectReadRecord indicates an expected call of GetObjectReadRecord.

func (*MockTrafficDBMockRecorder) GetReadRecord

func (mr *MockTrafficDBMockRecorder) GetReadRecord(timeRange interface{}) *gomock.Call

GetReadRecord indicates an expected call of GetReadRecord.

func (*MockTrafficDBMockRecorder) GetUserReadRecord

func (mr *MockTrafficDBMockRecorder) GetUserReadRecord(userAddress, timeRange interface{}) *gomock.Call

GetUserReadRecord indicates an expected call of GetUserReadRecord.

type MockUploadObjectProgressDB

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

MockUploadObjectProgressDB is a mock of UploadObjectProgressDB interface.

func NewMockUploadObjectProgressDB

func NewMockUploadObjectProgressDB(ctrl *gomock.Controller) *MockUploadObjectProgressDB

NewMockUploadObjectProgressDB creates a new mock instance.

func (*MockUploadObjectProgressDB) DeleteUploadProgress added in v0.2.3

func (m *MockUploadObjectProgressDB) DeleteUploadProgress(objectID uint64) error

DeleteUploadProgress mocks base method.

func (*MockUploadObjectProgressDB) EXPECT

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

func (*MockUploadObjectProgressDB) GetUploadMetasToReplicate added in v0.2.3

func (m *MockUploadObjectProgressDB) GetUploadMetasToReplicate(limit int) ([]*UploadObjectMeta, error)

GetUploadMetasToReplicate mocks base method.

func (*MockUploadObjectProgressDB) GetUploadMetasToSeal added in v0.2.3

func (m *MockUploadObjectProgressDB) GetUploadMetasToSeal(limit int) ([]*UploadObjectMeta, error)

GetUploadMetasToSeal mocks base method.

func (*MockUploadObjectProgressDB) GetUploadState added in v0.2.3

func (m *MockUploadObjectProgressDB) GetUploadState(objectID uint64) (types.TaskState, error)

GetUploadState mocks base method.

func (*MockUploadObjectProgressDB) InsertUploadProgress added in v0.2.3

func (m *MockUploadObjectProgressDB) InsertUploadProgress(objectID uint64) error

InsertUploadProgress mocks base method.

func (*MockUploadObjectProgressDB) UpdateUploadProgress

func (m *MockUploadObjectProgressDB) UpdateUploadProgress(uploadMeta *UploadObjectMeta) error

UpdateUploadProgress mocks base method.

type MockUploadObjectProgressDBMockRecorder

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

MockUploadObjectProgressDBMockRecorder is the mock recorder for MockUploadObjectProgressDB.

func (*MockUploadObjectProgressDBMockRecorder) DeleteUploadProgress added in v0.2.3

func (mr *MockUploadObjectProgressDBMockRecorder) DeleteUploadProgress(objectID interface{}) *gomock.Call

DeleteUploadProgress indicates an expected call of DeleteUploadProgress.

func (*MockUploadObjectProgressDBMockRecorder) GetUploadMetasToReplicate added in v0.2.3

func (mr *MockUploadObjectProgressDBMockRecorder) GetUploadMetasToReplicate(limit interface{}) *gomock.Call

GetUploadMetasToReplicate indicates an expected call of GetUploadMetasToReplicate.

func (*MockUploadObjectProgressDBMockRecorder) GetUploadMetasToSeal added in v0.2.3

func (mr *MockUploadObjectProgressDBMockRecorder) GetUploadMetasToSeal(limit interface{}) *gomock.Call

GetUploadMetasToSeal indicates an expected call of GetUploadMetasToSeal.

func (*MockUploadObjectProgressDBMockRecorder) GetUploadState added in v0.2.3

func (mr *MockUploadObjectProgressDBMockRecorder) GetUploadState(objectID interface{}) *gomock.Call

GetUploadState indicates an expected call of GetUploadState.

func (*MockUploadObjectProgressDBMockRecorder) InsertUploadProgress added in v0.2.3

func (mr *MockUploadObjectProgressDBMockRecorder) InsertUploadProgress(objectID interface{}) *gomock.Call

InsertUploadProgress indicates an expected call of InsertUploadProgress.

func (*MockUploadObjectProgressDBMockRecorder) UpdateUploadProgress

func (mr *MockUploadObjectProgressDBMockRecorder) UpdateUploadProgress(uploadMeta interface{}) *gomock.Call

UpdateUploadProgress indicates an expected call of UpdateUploadProgress.

type OffChainAuthKey

type OffChainAuthKey struct {
	UserAddress string
	Domain      string

	CurrentNonce     int32
	CurrentPublicKey string
	NextNonce        int32
	ExpiryDate       time.Time

	CreatedTime  time.Time
	ModifiedTime time.Time
}

type OffChainAuthKeyDB

type OffChainAuthKeyDB interface {
	GetAuthKey(userAddress string, domain string) (*OffChainAuthKey, error)
	UpdateAuthKey(userAddress string, domain string, oldNonce int32, newNonce int32, newPublicKey string, newExpiryDate time.Time) error
	InsertAuthKey(newRecord *OffChainAuthKey) error
}

OffChainAuthKeyDB interface.

type ReadRecord

type ReadRecord struct {
	BucketID        uint64
	ObjectID        uint64
	UserAddress     string
	BucketName      string
	ObjectName      string
	ReadSize        uint64
	ReadTimestampUs int64
}

ReadRecord defines a read request record, will decrease the bucket read quota.

type SPInfoDB

type SPInfoDB interface {
	// UpdateAllSp update all sp info, delete old sp info.
	UpdateAllSp(spList []*sptypes.StorageProvider) error
	// FetchAllSp if status is nil return all sp info; otherwise return sp info by status.
	FetchAllSp(status ...sptypes.Status) ([]*sptypes.StorageProvider, error)
	// FetchAllSpWithoutOwnSp if status is nil return all sp info without own sp;
	// otherwise return sp info by status without own sp.
	FetchAllSpWithoutOwnSp(status ...sptypes.Status) ([]*sptypes.StorageProvider, error)
	// GetSpByAddress return sp info by address and addressType.
	GetSpByAddress(address string, addressType SpAddressType) (*sptypes.StorageProvider, error)
	// GetSpByEndpoint return sp info by endpoint.
	GetSpByEndpoint(endpoint string) (*sptypes.StorageProvider, error)
	// GetOwnSpInfo return own sp info.
	GetOwnSpInfo() (*sptypes.StorageProvider, error)
	// SetOwnSpInfo set(maybe overwrite) own sp info.
	SetOwnSpInfo(sp *sptypes.StorageProvider) error
}

SPInfoDB defines a series of sp interfaces.

type SignatureDB

type SignatureDB interface {
	/*
		Object Signature is used to get challenge info.
	*/
	// GetObjectIntegrity gets integrity meta info by object id.
	GetObjectIntegrity(objectID uint64) (*IntegrityMeta, error)
	// SetObjectIntegrity sets(maybe overwrite) integrity hash info to db.
	SetObjectIntegrity(integrity *IntegrityMeta) error
	// DeleteObjectIntegrity deletes the integrity hash.
	DeleteObjectIntegrity(objectID uint64) error
	// AppendObjectChecksumIntegrity gets integrity meta info by object id.
	AppendObjectChecksumIntegrity(objectID uint64, checksum []byte) error
	/*
		Piece Signature is used to help replicate object's piece data to secondary sps, which is temporary.
	*/
	// SetReplicatePieceChecksum sets(maybe overwrite) the piece hash.
	SetReplicatePieceChecksum(objectID uint64, replicateIdx uint32, pieceIdx uint32, checksum []byte) error
	// GetAllReplicatePieceChecksum gets all piece hashes.
	GetAllReplicatePieceChecksum(objectID uint64, replicateIdx uint32, pieceCount uint32) ([][]byte, error)
	// DeleteAllReplicatePieceChecksum deletes all piece hashes.
	DeleteAllReplicatePieceChecksum(objectID uint64, replicateIdx uint32, pieceCount uint32) error
}

SignatureDB abstract object integrity interface.

type SpAddressType

type SpAddressType int32

SpAddressType identify address type of SP.

const (
	OperatorAddressType SpAddressType = iota + 1
	FundingAddressType
	SealAddressType
	ApprovalAddressType
)

type TrafficDB

type TrafficDB interface {
	// CheckQuotaAndAddReadRecord create bucket traffic firstly if bucket is not existed,
	// and check whether the added traffic record exceeds the quota, if it exceeds the quota,
	// it will return error, Otherwise, add a record and return nil.
	CheckQuotaAndAddReadRecord(record *ReadRecord, quota *BucketQuota) error
	// GetBucketTraffic return bucket traffic info,
	// notice maybe return (nil, nil) while there is no bucket traffic.
	GetBucketTraffic(bucketID uint64, yearMonth string) (*BucketTraffic, error)
	// GetReadRecord return record list by time range.
	GetReadRecord(timeRange *TrafficTimeRange) ([]*ReadRecord, error)
	// GetBucketReadRecord return bucket record list by time range.
	GetBucketReadRecord(bucketID uint64, timeRange *TrafficTimeRange) ([]*ReadRecord, error)
	// GetObjectReadRecord return object record list by time range.
	GetObjectReadRecord(objectID uint64, timeRange *TrafficTimeRange) ([]*ReadRecord, error)
	// GetUserReadRecord return user record list by time range.
	GetUserReadRecord(userAddress string, timeRange *TrafficTimeRange) ([]*ReadRecord, error)
}

TrafficDB defines a series of traffic interfaces.

type TrafficTimeRange

type TrafficTimeRange struct {
	StartTimestampUs int64
	EndTimestampUs   int64
	LimitNum         int // is unlimited if LimitNum <= 0.
}

TrafficTimeRange is used by query, return records in [StartTimestampUs, EndTimestampUs).

type UploadObjectMeta

type UploadObjectMeta struct {
	ObjectID             uint64
	TaskState            storetypes.TaskState
	GlobalVirtualGroupID uint32
	SecondaryEndpoints   []string
	SecondarySignatures  [][]byte
	ErrorDescription     string
}

UploadObjectMeta defines the upload object state and related seal info, etc.

type UploadObjectProgressDB

type UploadObjectProgressDB interface {
	// InsertUploadProgress inserts a new upload object progress.
	InsertUploadProgress(objectID uint64) error
	// DeleteUploadProgress deletes the upload object progress.
	DeleteUploadProgress(objectID uint64) error
	// UpdateUploadProgress updates the upload object progress state.
	UpdateUploadProgress(uploadMeta *UploadObjectMeta) error
	// GetUploadState queries the task state by object id.
	GetUploadState(objectID uint64) (storetypes.TaskState, string, error)
	// GetUploadMetasToReplicate queries the latest upload_done/replicate_doing object to continue replicate.
	// It is only used in startup.
	GetUploadMetasToReplicate(limit int, timeout int64) ([]*UploadObjectMeta, error)
	// GetUploadMetasToSeal queries the latest replicate_done/seal_doing object to continue seal.
	// It is only used in startup.
	GetUploadMetasToSeal(limit int, timeout int64) ([]*UploadObjectMeta, error)
	// InsertPutEvent inserts a new upload event progress.
	InsertPutEvent(task coretask.Task) error
}

UploadObjectProgressDB interface which records upload object related progress(includes foreground and background) and state.

Jump to

Keyboard shortcuts

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