db

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitTables

func InitTables(d *SQLDB, serverID dtypes.ServerID) error

InitTables initializes data tables.

Types

type SQLDB

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

SQLDB represents a scheduler sql database.

func NewSQLDB

func NewSQLDB(db *sqlx.DB) (*SQLDB, error)

NewSQLDB creates a new SQLDB instance.

func (*SQLDB) AssetExists

func (n *SQLDB) AssetExists(hash string, serverID dtypes.ServerID) (bool, error)

AssetExists checks if an asset exists in the state machine table of the specified server.

func (*SQLDB) AssetExistsOfUser added in v0.1.11

func (n *SQLDB) AssetExistsOfUser(hash, userID string) (bool, error)

AssetExistsOfUser checks if an asset exists

func (*SQLDB) AssetGroupExists added in v0.1.11

func (n *SQLDB) AssetGroupExists(userID string, gid int) (bool, error)

AssetGroupExists is group exists

func (*SQLDB) CreateAssetGroup added in v0.1.11

func (n *SQLDB) CreateAssetGroup(info *types.AssetGroup) (*types.AssetGroup, error)

CreateAssetGroup create a group

func (*SQLDB) DeleteAssetGroup added in v0.1.11

func (n *SQLDB) DeleteAssetGroup(userID string, gid int) error

DeleteAssetGroup delete asset group

func (*SQLDB) DeleteAssetRecordsOfNode added in v0.1.11

func (n *SQLDB) DeleteAssetRecordsOfNode(nodeID string) error

DeleteAssetRecordsOfNode clean asset records of node

func (*SQLDB) DeleteAssetReplica

func (n *SQLDB) DeleteAssetReplica(hash, nodeID string) error

DeleteAssetReplica remove a replica associated with a given asset hash from the database.

func (*SQLDB) DeleteAssetUser added in v0.1.10

func (n *SQLDB) DeleteAssetUser(hash, userID string) error

DeleteAssetUser delete asset and user info

func (*SQLDB) DeleteAssetsView

func (n *SQLDB) DeleteAssetsView(nodeID string) error

DeleteAssetsView delete the asset view for node

func (*SQLDB) DeleteBucket

func (n *SQLDB) DeleteBucket(bucketID string) error

DeleteBucket delete the bucket

func (*SQLDB) DeleteEdgeUpdateConfig

func (n *SQLDB) DeleteEdgeUpdateConfig(nodeType int) error

DeleteEdgeUpdateConfig delete edge update info

func (*SQLDB) DeleteNodeInfo

func (n *SQLDB) DeleteNodeInfo(nodeID string) error

DeleteNodeInfo delete Node info

func (*SQLDB) DeleteReplenishBackup added in v0.1.11

func (n *SQLDB) DeleteReplenishBackup(hash string) error

DeleteReplenishBackup delete

func (*SQLDB) DeleteReplicaEvents added in v0.1.11

func (n *SQLDB) DeleteReplicaEvents() error

DeleteReplicaEvents delete events

func (*SQLDB) DeleteUnfinishedReplicas

func (n *SQLDB) DeleteUnfinishedReplicas(hash string) error

DeleteUnfinishedReplicas deletes the incomplete replicas with the given hash from the database.

func (*SQLDB) GetAssetCountsForUser added in v0.1.11

func (n *SQLDB) GetAssetCountsForUser(user string, groupID int) (int, error)

GetAssetCountsForUser Get asset count

func (*SQLDB) GetAssetExpiration added in v0.1.11

func (n *SQLDB) GetAssetExpiration(hash, userID string) (time.Time, error)

func (*SQLDB) GetAssetGroupCount added in v0.1.11

func (n *SQLDB) GetAssetGroupCount(userID string) (int64, error)

GetAssetGroupCount get asset group count of user

func (*SQLDB) GetAssetGroupParent added in v0.1.11

func (n *SQLDB) GetAssetGroupParent(gid int) (int, error)

GetAssetGroupParent get a group parent

func (*SQLDB) GetAssetName added in v0.1.11

func (n *SQLDB) GetAssetName(hash, userID string) (string, error)

GetAssetName Get asset name of user

func (*SQLDB) GetAssetVisitCount added in v0.1.11

func (n *SQLDB) GetAssetVisitCount(assetHash string) (int, error)

GetAssetVisitCount get asset visit count

func (*SQLDB) GetNodePullingCount added in v0.1.15

func (n *SQLDB) GetNodePullingCount(nodeID string) (int64, error)

GetNodePullingCount

func (*SQLDB) GetSizeForUserAsset added in v0.1.11

func (n *SQLDB) GetSizeForUserAsset(hash, userID string) (int64, error)

GetSizeForUserAsset Get asset size of user

func (*SQLDB) GetUserAssetCountByGroupID added in v0.1.11

func (n *SQLDB) GetUserAssetCountByGroupID(user string, groupID int) (int, error)

GetUserAssetCountByGroupID Get count by group id

func (*SQLDB) GetUserStorageSize added in v0.1.10

func (n *SQLDB) GetUserStorageSize(user string) (int64, error)

GetUserStorageSize Get the Storage Size already used by the user

func (*SQLDB) IsValidator

func (n *SQLDB) IsValidator(nodeID string) (bool, error)

IsValidator Determine whether the node is a validator

func (*SQLDB) ListAWSData added in v0.1.13

func (n *SQLDB) ListAWSData(limit, offset int, isDistribute bool) ([]*types.AWSDataInfo, error)

ListAWSData

func (*SQLDB) ListAssetGroupForUser added in v0.1.11

func (n *SQLDB) ListAssetGroupForUser(user string, parent, limit, offset int) (*types.ListAssetGroupRsp, error)

ListAssetGroupForUser get asset group list

func (*SQLDB) ListAssetsForUser added in v0.1.10

func (n *SQLDB) ListAssetsForUser(user string, limit, offset, groupID int) ([]*types.UserAssetDetail, error)

ListAssetsForUser Get a list of assets by user

func (*SQLDB) ListStorageStatsOfUsers added in v0.1.11

func (n *SQLDB) ListStorageStatsOfUsers(limit, offset int) (*types.ListStorageStatsRsp, error)

ListStorageStatsOfUsers load users storage stats

func (*SQLDB) ListUsersForAsset added in v0.1.10

func (n *SQLDB) ListUsersForAsset(hash string) ([]string, error)

ListUsersForAsset Get a list of users by asset

func (*SQLDB) LoadAWSData added in v0.1.13

func (n *SQLDB) LoadAWSData(bucket string) (*types.AWSDataInfo, error)

LoadAWSData

func (*SQLDB) LoadAWSRecords added in v0.1.15

func (n *SQLDB) LoadAWSRecords(statuses []string, serverID dtypes.ServerID) ([]*types.AssetRecord, error)

LoadAWSRecords load the asset records from the incoming scheduler

func (*SQLDB) LoadAllAssetRecords

func (n *SQLDB) LoadAllAssetRecords(serverID dtypes.ServerID, limit, offset int, statuses []string) (*sqlx.Rows, error)

LoadAllAssetRecords loads all asset records for a given server ID.

func (*SQLDB) LoadAllHashesOfNode added in v0.1.11

func (n *SQLDB) LoadAllHashesOfNode(nodeID string) ([]string, error)

LoadAllHashesOfNode load asset replica information based on node.

func (*SQLDB) LoadAllReplicasByNodeID added in v0.1.16

func (n *SQLDB) LoadAllReplicasByNodeID(nodeID string, limit, offset int, statues []types.ReplicaStatus) (*types.ListNodeReplicaRsp, error)

LoadAllReplicasByNodeID load replicas of node.

func (*SQLDB) LoadAssetCount

func (n *SQLDB) LoadAssetCount(serverID dtypes.ServerID, filterState string) (int, error)

LoadAssetCount count asset

func (*SQLDB) LoadAssetRecord

func (n *SQLDB) LoadAssetRecord(hash string) (*types.AssetRecord, error)

LoadAssetRecord load asset record information

func (*SQLDB) LoadAssetRecords

func (n *SQLDB) LoadAssetRecords(statuses []string, limit, offset int, serverID dtypes.ServerID) (*sqlx.Rows, error)

LoadAssetRecords load the asset records from the incoming scheduler

func (*SQLDB) LoadAssetStateInfo added in v0.1.10

func (n *SQLDB) LoadAssetStateInfo(hash string, serverID dtypes.ServerID) (*types.AssetStateInfo, error)

LoadAssetStateInfo loads the state of the asset for a given server ID.

func (*SQLDB) LoadBucket

func (n *SQLDB) LoadBucket(bucketID string) ([]byte, error)

LoadBucket load assets ids from bucket return hashes of asset

func (*SQLDB) LoadBucketHashes

func (n *SQLDB) LoadBucketHashes(nodeID string) ([]byte, error)

LoadBucketHashes load assets view buckets hashes

func (*SQLDB) LoadCreateValidationResultInfos added in v0.1.16

func (n *SQLDB) LoadCreateValidationResultInfos() ([]*types.ValidationResultInfo, error)

LoadCreateValidationResultInfos load validation results.

func (*SQLDB) LoadDeactivateNodeTime added in v0.1.11

func (n *SQLDB) LoadDeactivateNodeTime(nodeID string) (int64, error)

LoadDeactivateNodeTime Get node deactivate time

func (*SQLDB) LoadDeactivateNodes added in v0.1.11

func (n *SQLDB) LoadDeactivateNodes() ([]string, error)

LoadDeactivateNodes load all deactivate node.

func (*SQLDB) LoadEdgeUpdateConfigs

func (n *SQLDB) LoadEdgeUpdateConfigs() (map[int]*api.EdgeUpdateConfig, error)

LoadEdgeUpdateConfigs load edge update information.

func (*SQLDB) LoadExpiredAssetRecords

func (n *SQLDB) LoadExpiredAssetRecords(serverID dtypes.ServerID, statuses []string) ([]*types.AssetRecord, error)

LoadExpiredAssetRecords load all expired asset records based on serverID.

func (*SQLDB) LoadFailedReplicas added in v0.1.16

func (n *SQLDB) LoadFailedReplicas() ([]*types.ReplicaInfo, error)

LoadFailedReplicas load replicas .

func (*SQLDB) LoadNeedRefillAssetRecords added in v0.1.13

func (n *SQLDB) LoadNeedRefillAssetRecords(serverID dtypes.ServerID, replicas int64, status string) (*types.AssetRecord, error)

LoadNeedRefillAssetRecords loads

func (*SQLDB) LoadNodeActivationKey added in v0.1.10

func (n *SQLDB) LoadNodeActivationKey(nodeID string) (string, error)

LoadNodeActivationKey load activation key of node.

func (*SQLDB) LoadNodeInfo

func (n *SQLDB) LoadNodeInfo(nodeID string) (*types.NodeInfo, error)

LoadNodeInfo load node information.

func (*SQLDB) LoadNodeInfos

func (n *SQLDB) LoadNodeInfos(limit, offset int) (*sqlx.Rows, int64, error)

LoadNodeInfos load nodes information.

func (*SQLDB) LoadNodeLastSeenTime

func (n *SQLDB) LoadNodeLastSeenTime(nodeID string) (time.Time, error)

LoadNodeLastSeenTime loads the last seen time of a node

func (*SQLDB) LoadNodePublicKey

func (n *SQLDB) LoadNodePublicKey(nodeID string) (string, error)

LoadNodePublicKey load public key of node.

func (*SQLDB) LoadNodeType

func (n *SQLDB) LoadNodeType(nodeID string) (types.NodeType, error)

LoadNodeType load type of node.

func (*SQLDB) LoadNodeValidationInfo

func (n *SQLDB) LoadNodeValidationInfo(roundID, nodeID string) (*types.ValidationResultInfo, error)

LoadNodeValidationInfo load the cid of a validation result.

func (*SQLDB) LoadNodesOfPullingReplica added in v0.1.16

func (n *SQLDB) LoadNodesOfPullingReplica(hash string) ([]string, error)

LoadNodesOfPullingReplica

func (*SQLDB) LoadReplenishBackups added in v0.1.11

func (n *SQLDB) LoadReplenishBackups() ([]string, error)

LoadReplenishBackups load asset replica information

func (*SQLDB) LoadReplicaEvents added in v0.1.10

func (n *SQLDB) LoadReplicaEvents(start, end time.Time, limit, offset int) (*types.ListReplicaEventRsp, error)

LoadReplicaEvents Load replica event

func (*SQLDB) LoadReplicaEventsOfNode added in v0.1.11

func (n *SQLDB) LoadReplicaEventsOfNode(nodeID string, limit, offset int) (*types.ListReplicaEventRsp, error)

LoadReplicaEventsOfNode Load replica event

func (*SQLDB) LoadReplicaSizeByNodeID added in v0.1.13

func (n *SQLDB) LoadReplicaSizeByNodeID(nodeID string) (int, error)

LoadReplicaSizeByNodeID load size of node.

func (*SQLDB) LoadReplicasByHash

func (n *SQLDB) LoadReplicasByHash(hash string, limit, offset int) (*types.ListReplicaRsp, error)

LoadReplicasByHash load replicas of asset hash.

func (*SQLDB) LoadReplicasByStatus added in v0.1.10

func (n *SQLDB) LoadReplicasByStatus(hash string, statuses []types.ReplicaStatus) ([]*types.ReplicaInfo, error)

LoadReplicasByStatus load asset replica information based on hash and statuses.

func (*SQLDB) LoadRetrieveEvent added in v0.1.11

func (n *SQLDB) LoadRetrieveEvent(tokenID string) (*types.RetrieveEvent, error)

LoadRetrieveEvent load retrieve event

func (*SQLDB) LoadRetrieveEventRecords added in v0.1.11

func (n *SQLDB) LoadRetrieveEventRecords(nodeID string, limit, offset int) (*types.ListRetrieveEventRsp, error)

LoadRetrieveEventRecords Load retrieve events

func (*SQLDB) LoadStorageStatsOfUser added in v0.1.11

func (n *SQLDB) LoadStorageStatsOfUser(userID string) (*types.StorageStats, error)

LoadStorageStatsOfUser load user storage stats

func (*SQLDB) LoadSucceedReplicasByNodeID added in v0.1.16

func (n *SQLDB) LoadSucceedReplicasByNodeID(nodeID string, limit, offset int) (*types.ListNodeAssetRsp, error)

LoadSucceedReplicasByNodeID load replicas of node.

func (*SQLDB) LoadSyncTime added in v0.1.10

func (n *SQLDB) LoadSyncTime(nodeID string) (time.Time, error)

LoadSyncTime load assets view sync time

func (*SQLDB) LoadTopHash

func (n *SQLDB) LoadTopHash(nodeID string) (string, error)

LoadTopHash load assets view top hash

func (*SQLDB) LoadUnCalculatedValidationResults added in v0.1.10

func (n *SQLDB) LoadUnCalculatedValidationResults(maxTime time.Time, limit int) (*sqlx.Rows, error)

LoadUnCalculatedValidationResults Load not calculated profit validation results

func (*SQLDB) LoadUnSavedValidationResults added in v0.1.10

func (n *SQLDB) LoadUnSavedValidationResults(limit int) (*sqlx.Rows, error)

LoadUnSavedValidationResults Load not save to file validation results

func (*SQLDB) LoadUnprocessedWorkloadResults added in v0.1.10

func (n *SQLDB) LoadUnprocessedWorkloadResults(limit int, endTime int64) (*sqlx.Rows, error)

LoadUnprocessedWorkloadResults Load unprocessed workload results

func (*SQLDB) LoadUserAPIKeys added in v0.1.10

func (n *SQLDB) LoadUserAPIKeys(userID string) ([]byte, error)

LoadUserAPIKeys load user api keys

func (*SQLDB) LoadUserInfo added in v0.1.11

func (n *SQLDB) LoadUserInfo(userID string) (*types.UserInfo, error)

LoadUserInfo load user info

func (*SQLDB) LoadValidationResultInfos

func (n *SQLDB) LoadValidationResultInfos(nodeID string, limit, offset int) (*types.ListValidationResultRsp, error)

LoadValidationResultInfos load validation results.

func (*SQLDB) LoadValidators

func (n *SQLDB) LoadValidators(serverID dtypes.ServerID) ([]string, error)

LoadValidators load validators information.

func (*SQLDB) LoadWorkloadRecord added in v0.1.10

func (n *SQLDB) LoadWorkloadRecord(tokenID string) (*types.WorkloadRecord, error)

LoadWorkloadRecord load workload record

func (*SQLDB) LoadWorkloadRecords added in v0.1.10

func (n *SQLDB) LoadWorkloadRecords(nodeID string, limit, offset int) (*types.ListWorkloadRecordRsp, error)

LoadWorkloadRecords Load workload records

func (*SQLDB) LoadWorkloadResults added in v0.1.11

func (n *SQLDB) LoadWorkloadResults(limit, offset int) (*sqlx.Rows, error)

LoadWorkloadResults Load workload results

func (*SQLDB) NodeExists

func (n *SQLDB) NodeExists(nodeID string, nodeType types.NodeType) error

NodeExists is node exists

func (*SQLDB) RegisterCount added in v0.1.13

func (n *SQLDB) RegisterCount(ip string) (int, error)

TodayRegisterCount get the number of registrations for this ip today

func (*SQLDB) RemoveInvalidValidationResult added in v0.1.11

func (n *SQLDB) RemoveInvalidValidationResult(sIDs []int) error

RemoveInvalidValidationResult Remove invalid validation results

func (*SQLDB) RemoveInvalidWorkloadResult added in v0.1.10

func (n *SQLDB) RemoveInvalidWorkloadResult(sIDs []string) error

RemoveInvalidWorkloadResult Remove invalid workload certificates

func (*SQLDB) SaveAWSData added in v0.1.13

func (n *SQLDB) SaveAWSData(infos []types.AWSDataInfo) error

SaveAWSData save data

func (*SQLDB) SaveAssetRecord

func (n *SQLDB) SaveAssetRecord(rInfo *types.AssetRecord) error

SaveAssetRecord saves an asset record into the database.

func (*SQLDB) SaveAssetUser added in v0.1.10

func (n *SQLDB) SaveAssetUser(hash, userID, assetName, assetType string, size int64, expiration time.Time, password string, groupID int) error

SaveAssetUser save asset and user info

func (*SQLDB) SaveAssetsView

func (n *SQLDB) SaveAssetsView(nodeID string, topHash string, bucketHashes []byte) error

SaveAssetsView update or insert top hash and buckets hashes to assets view bucketHashes key is number of bucket, value is bucket hash TODO save bucketHashes as array

func (*SQLDB) SaveBucket

func (n *SQLDB) SaveBucket(bucketID string, assetHashes []byte) error

SaveBucket update or insert assets ids to bucket

func (*SQLDB) SaveDeactivateNode added in v0.1.11

func (n *SQLDB) SaveDeactivateNode(nodeID string, time int64) error

SaveDeactivateNode save deactivate node time

func (*SQLDB) SaveEdgeUpdateConfig

func (n *SQLDB) SaveEdgeUpdateConfig(info *api.EdgeUpdateConfig) error

SaveEdgeUpdateConfig inserts edge update information.

func (*SQLDB) SaveNodeInfo

func (n *SQLDB) SaveNodeInfo(info *types.NodeInfo) error

SaveNodeInfo Insert or update node info

func (*SQLDB) SaveNodePublicKey added in v0.1.10

func (n *SQLDB) SaveNodePublicKey(pKey, nodeID string) error

SaveNodePublicKey update node public key

func (*SQLDB) SaveNodeRegisterInfos added in v0.1.10

func (n *SQLDB) SaveNodeRegisterInfos(details []*types.ActivationDetail) error

SaveNodeRegisterInfos Insert Node register info

func (*SQLDB) SaveReplenishBackup added in v0.1.11

func (n *SQLDB) SaveReplenishBackup(hashes []string) error

SaveReplenishBackup Save assets that require replenish backups

func (*SQLDB) SaveReplicaEvent added in v0.1.11

func (n *SQLDB) SaveReplicaEvent(hash, cid, nodeID string, size int64, expiration time.Time, event types.ReplicaEvent) error

func (*SQLDB) SaveReplicasStatus added in v0.1.10

func (n *SQLDB) SaveReplicasStatus(infos []*types.ReplicaInfo) error

SaveReplicasStatus inserts or updates replicas status

func (*SQLDB) SaveRetrieveEventInfo added in v0.1.11

func (n *SQLDB) SaveRetrieveEventInfo(cInfo *types.RetrieveEvent) error

SaveRetrieveEventInfo save retrieve event and update node info

func (*SQLDB) SaveUserAPIKeys added in v0.1.10

func (n *SQLDB) SaveUserAPIKeys(userID string, apiKeys []byte) error

SaveUserAPIKeys save user api keys, apiKeys is map[string]UsetAPIKeysInfo encode by gob

func (*SQLDB) SaveUserTotalStorageSize added in v0.1.10

func (n *SQLDB) SaveUserTotalStorageSize(userID string, totalSize int64) error

SaveUserTotalStorageSize save user storage size

func (*SQLDB) SaveValidationResultInfos

func (n *SQLDB) SaveValidationResultInfos(infos []*types.ValidationResultInfo) error

SaveValidationResultInfos inserts validation result information.

func (*SQLDB) SaveWorkloadRecord added in v0.1.10

func (n *SQLDB) SaveWorkloadRecord(records []*types.WorkloadRecord) error

SaveWorkloadRecord save workload record

func (*SQLDB) UpdateAWSData added in v0.1.13

func (n *SQLDB) UpdateAWSData(info *types.AWSDataInfo) error

UpdateAWSData update aws info

func (*SQLDB) UpdateAssetGroup added in v0.1.11

func (n *SQLDB) UpdateAssetGroup(hash, userID string, groupID int) error

UpdateAssetGroup update user asset group

func (*SQLDB) UpdateAssetGroupName added in v0.1.11

func (n *SQLDB) UpdateAssetGroupName(userID, rename string, groupID int) error

UpdateAssetGroupName update user asset group name

func (*SQLDB) UpdateAssetGroupParent added in v0.1.11

func (n *SQLDB) UpdateAssetGroupParent(userID string, groupID, parent int) error

UpdateAssetGroupParent update user asset group parent

func (*SQLDB) UpdateAssetInfo added in v0.1.10

func (n *SQLDB) UpdateAssetInfo(hash, state string, totalBlock, totalSize, retryCount, replenishReplicas int64, serverID dtypes.ServerID) error

UpdateAssetInfo update asset information

func (*SQLDB) UpdateAssetRecordExpiration added in v0.1.10

func (n *SQLDB) UpdateAssetRecordExpiration(hash string, eTime time.Time) error

UpdateAssetRecordExpiration resets asset record expiration time based on hash and eTime

func (*SQLDB) UpdateAssetRecordReplicaCount added in v0.1.14

func (n *SQLDB) UpdateAssetRecordReplicaCount(cid string, count int) error

UpdateAssetRecordReplicaCount

func (*SQLDB) UpdateAssetShareStatus added in v0.1.11

func (n *SQLDB) UpdateAssetShareStatus(hash, userID string, status int64) error

UpdateAssetShareStatus save share status

func (*SQLDB) UpdateAssetVisitCount added in v0.1.11

func (n *SQLDB) UpdateAssetVisitCount(assetHash string) error

UpdateAssetVisitCount update asset visit count

func (*SQLDB) UpdateFileSavedStatus added in v0.1.10

func (n *SQLDB) UpdateFileSavedStatus(ids []int) error

UpdateFileSavedStatus update the file saved in validation result

func (*SQLDB) UpdateNodeDownloadTraffic added in v0.1.11

func (n *SQLDB) UpdateNodeDownloadTraffic(nodeID string, incSize int64) error

UpdateNodeDownloadTraffic update node download traffic

func (*SQLDB) UpdateNodeInfosByValidationResult added in v0.1.10

func (n *SQLDB) UpdateNodeInfosByValidationResult(sIDs []int, nodeProfits map[string]float64) error

UpdateNodeInfosByValidationResult Update the info value of the node, and set the calculated flag to the validation record

func (*SQLDB) UpdateNodeUploadTraffic added in v0.1.11

func (n *SQLDB) UpdateNodeUploadTraffic(nodeID string, incSize int64) error

UpdateNodeUploadTraffic update node upload traffic

func (*SQLDB) UpdateOnlineDuration added in v0.1.10

func (n *SQLDB) UpdateOnlineDuration(infos []*types.NodeSnapshot) error

UpdateOnlineDuration update node online time , last time , disk usage

func (*SQLDB) UpdatePortMapping

func (n *SQLDB) UpdatePortMapping(nodeID, port string) error

UpdatePortMapping sets the node's mapping port.

func (*SQLDB) UpdateReplicaInfo added in v0.1.10

func (n *SQLDB) UpdateReplicaInfo(cInfo *types.ReplicaInfo) error

UpdateReplicaInfo update unfinished replica info , return an error if the replica is finished

func (*SQLDB) UpdateReplicasStatusToFailed

func (n *SQLDB) UpdateReplicasStatusToFailed(hash string) error

UpdateReplicasStatusToFailed updates the status of unfinished asset replicas

func (*SQLDB) UpdateSyncTime added in v0.1.10

func (n *SQLDB) UpdateSyncTime(nodeID string) error

UpdateSyncTime update assets view sync time

func (*SQLDB) UpdateUserInfo added in v0.1.11

func (n *SQLDB) UpdateUserInfo(userID string, incSize, incCount int64) error

UpdateUserInfo update user info

func (*SQLDB) UpdateUserPeakSize added in v0.1.11

func (n *SQLDB) UpdateUserPeakSize(userID string, peakSize int64) error

UpdateUserPeakSize update user peakSize

func (*SQLDB) UpdateUserVIPAndStorageSize added in v0.1.11

func (n *SQLDB) UpdateUserVIPAndStorageSize(userID string, enableVIP bool, storageSize int64) error

UpdateUserVIPAndStorageSize update user info

func (*SQLDB) UpdateValidationResultInfo

func (n *SQLDB) UpdateValidationResultInfo(info *types.ValidationResultInfo) error

UpdateValidationResultInfo updates the validation result information.

func (*SQLDB) UpdateValidationResultStatus added in v0.1.16

func (n *SQLDB) UpdateValidationResultStatus(roundID, nodeID string, status types.ValidationStatus) error

UpdateValidationResultsTimeout sets the validation results' status as timeout.

func (*SQLDB) UpdateValidatorInfo

func (n *SQLDB) UpdateValidatorInfo(serverID dtypes.ServerID, nodeID string) error

UpdateValidatorInfo reset scheduler server id for validator

func (*SQLDB) UpdateValidators

func (n *SQLDB) UpdateValidators(nodeIDs []string, serverID dtypes.ServerID) error

UpdateValidators update validators

func (*SQLDB) UpdateWorkloadRecord added in v0.1.10

func (n *SQLDB) UpdateWorkloadRecord(record *types.WorkloadRecord) error

UpdateWorkloadRecord update workload record

Jump to

Keyboard shortcuts

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