Documentation ¶
Index ¶
- Variables
- type EdgeUpdateManager
- func (eu *EdgeUpdateManager) DeleteEdgeUpdateConfig(ctx context.Context, nodeType int) error
- func (eu *EdgeUpdateManager) GetEdgeUpdateConfigs(ctx context.Context) (map[int]*api.EdgeUpdateConfig, error)
- func (eu *EdgeUpdateManager) SetEdgeUpdateConfig(ctx context.Context, info *api.EdgeUpdateConfig) error
- type Scheduler
- func (s *Scheduler) AddAWSData(ctx context.Context, list []types.AWSDataInfo) error
- func (s *Scheduler) AllocateStorage(ctx context.Context, userID string) (*types.UserInfo, error)
- func (s *Scheduler) AssignTunserverURL(ctx context.Context) (*types.TunserverRsp, error)
- func (s *Scheduler) CalculateExitProfit(ctx context.Context, nodeID string) (types.ExitProfitRsp, error)
- func (s *Scheduler) CandidateCodeExist(ctx context.Context, code string) (bool, error)
- func (s *Scheduler) CandidateConnect(ctx context.Context, opts *types.ConnectOptions) error
- func (s *Scheduler) CheckIpUsage(ctx context.Context, ip string) (bool, error)
- func (s *Scheduler) CreateAPIKey(ctx context.Context, userID, keyName string, perms []types.UserAccessControl) (string, error)
- func (s *Scheduler) CreateAsset(ctx context.Context, req *types.CreateAssetReq) (*types.UploadInfo, error)
- func (s *Scheduler) CreateAssetGroup(ctx context.Context, userID, name string, parent int) (*types.AssetGroup, error)
- func (s *Scheduler) DeactivateNode(ctx context.Context, nodeID string, hours int) error
- func (s *Scheduler) DeleteAPIKey(ctx context.Context, userID, name string) error
- func (s *Scheduler) DeleteAsset(ctx context.Context, userID, assetCID string) error
- func (s *Scheduler) DeleteAssetGroup(ctx context.Context, userID string, gid int) error
- func (s *Scheduler) DeleteProject(ctx context.Context, req *types.ProjectReq) error
- func (s *Scheduler) DeployProject(ctx context.Context, req *types.DeployProjectReq) error
- func (s *Scheduler) DownloadDataResult(ctx context.Context, bucket, cid string, size int64) error
- func (s *Scheduler) EdgeConnect(ctx context.Context, opts *types.ConnectOptions) error
- func (s *Scheduler) ElectValidators(ctx context.Context, nodeIDs []string, cleanOld bool) error
- func (s *Scheduler) FreeUpDiskSpace(ctx context.Context, nodeID string, size int64) (*types.FreeUpDiskResp, error)
- func (s *Scheduler) GenerateCandidateCode(ctx context.Context, count int, nodeType types.NodeType, isTest bool) ([]string, error)
- func (s *Scheduler) GetAPIKeys(ctx context.Context, userID string) (map[string]types.UserAPIKeysInfo, error)
- func (s *Scheduler) GetAPPKeyPermissions(ctx context.Context, userID string, keyName string) ([]string, error)
- func (s *Scheduler) GetAssetCount(ctx context.Context) (int, error)
- func (s *Scheduler) GetAssetListForBucket(ctx context.Context, bucketID uint32) ([]string, error)
- func (s *Scheduler) GetAssetRecord(ctx context.Context, cid string) (*types.AssetRecord, error)
- func (s *Scheduler) GetAssetRecords(ctx context.Context, limit, offset int, statuses []string, ...) ([]*types.AssetRecord, error)
- func (s *Scheduler) GetAssetSourceDownloadInfo(ctx context.Context, cid string) (*types.AssetSourceDownloadInfoRsp, error)
- func (s *Scheduler) GetAssetStatus(ctx context.Context, userID, assetCID string) (*types.AssetStatus, error)
- func (s *Scheduler) GetAssetView(ctx context.Context, nodeID string, isFromNode bool) (*types.AssetView, error)
- func (s *Scheduler) GetAssetsForNode(ctx context.Context, nodeID string, limit, offset int) (*types.ListNodeAssetRsp, error)
- func (s *Scheduler) GetAssetsInBucket(ctx context.Context, nodeID string, bucketID int, isFromNode bool) ([]string, error)
- func (s *Scheduler) GetCandidateCodeInfos(ctx context.Context, nodeID, code string) ([]*types.CandidateCodeInfo, error)
- func (s *Scheduler) GetCandidateDownloadInfos(ctx context.Context, cid string) ([]*types.CandidateDownloadInfo, error)
- func (s *Scheduler) GetCandidateIPs(ctx context.Context) ([]*types.NodeIPInfo, error)
- func (s *Scheduler) GetCandidateNodeIP(ctx context.Context, nodeID string) (string, error)
- func (s *Scheduler) GetCandidateURLsForDetectNat(ctx context.Context) ([]string, error)
- func (s *Scheduler) GetCurrentRegionInfos(ctx context.Context, areaID string) (map[string]int, error)
- func (s *Scheduler) GetEdgeDownloadInfos(ctx context.Context, cid string) (*types.EdgeDownloadInfoList, error)
- func (s *Scheduler) GetEdgeExternalServiceAddress(ctx context.Context, nodeID, candidateURL string) (string, error)
- func (s *Scheduler) GetExternalAddress(ctx context.Context) (string, error)
- func (s *Scheduler) GetMinioConfigFromCandidate(ctx context.Context, nodeID string) (*types.MinioConfig, error)
- func (s *Scheduler) GetNextFreeTime(ctx context.Context, nodeID string) (int64, error)
- func (s *Scheduler) GetNodeInfo(ctx context.Context, nodeID string) (types.NodeInfo, error)
- func (s *Scheduler) GetNodeList(ctx context.Context, offset int, limit int) (*types.ListNodesRsp, error)
- func (s *Scheduler) GetNodeOfIP(ctx context.Context, ip string) ([]string, error)
- func (s *Scheduler) GetNodeOnlineState(ctx context.Context) (bool, error)
- func (s *Scheduler) GetNodePublicKey(ctx context.Context, nodeID string) (string, error)
- func (s *Scheduler) GetNodeToken(ctx context.Context, nodeID string) (string, error)
- func (s *Scheduler) GetNodeUploadInfo(ctx context.Context, userID string) (*types.UploadInfo, error)
- func (s *Scheduler) GetNodesFromRegion(ctx context.Context, areaID string) ([]*types.NodeInfo, error)
- func (s *Scheduler) GetOnlineNodeCount(ctx context.Context, nodeType types.NodeType) (int, error)
- func (s *Scheduler) GetProfitDetailsForNode(ctx context.Context, nodeID string, limit, offset int, ts []int) (*types.ListNodeProfitDetailsRsp, error)
- func (s *Scheduler) GetProjectInfo(ctx context.Context, uuid string) (*types.ProjectInfo, error)
- func (s *Scheduler) GetProjectInfos(ctx context.Context, userID string, limit, offset int) ([]*types.ProjectInfo, error)
- func (s *Scheduler) GetProjectsForNode(ctx context.Context, nodeID string) ([]*types.ProjectReplicas, error)
- func (s *Scheduler) GetReplicaEvents(ctx context.Context, start, end time.Time, limit, offset int) (*types.ListReplicaEventRsp, error)
- func (s *Scheduler) GetReplicaEventsForNode(ctx context.Context, nodeID string, limit, offset int) (*types.ListReplicaEventRsp, error)
- func (s *Scheduler) GetReplicas(ctx context.Context, cid string, limit, offset int) (*types.ListReplicaRsp, error)
- func (s *Scheduler) GetReplicasForNode(ctx context.Context, nodeID string, limit, offset int, ...) (*types.ListNodeReplicaRsp, error)
- func (s *Scheduler) GetRetrieveEventRecords(ctx context.Context, nodeID string, limit, offset int) (*types.ListRetrieveEventRsp, error)
- func (s *Scheduler) GetSchedulerPublicKey(ctx context.Context) (string, error)
- func (s *Scheduler) GetUserAccessToken(ctx context.Context, userID string) (string, error)
- func (s *Scheduler) GetUserInfo(ctx context.Context, userID string) (*types.UserInfo, error)
- func (s *Scheduler) GetUserInfos(ctx context.Context, userIDs []string) (map[string]*types.UserInfo, error)
- func (s *Scheduler) GetUserStorageStats(ctx context.Context, userID string) (*types.StorageStats, error)
- func (s *Scheduler) GetValidationInfo(ctx context.Context) (*types.ValidationInfo, error)
- func (s *Scheduler) GetValidationResults(ctx context.Context, nodeID string, limit, offset int) (*types.ListValidationResultRsp, error)
- func (s *Scheduler) GetWorkloadRecord(ctx context.Context, id string) (*types.WorkloadRecord, error)
- func (s *Scheduler) GetWorkloadRecords(ctx context.Context, nodeID string, limit, offset int) (*types.ListWorkloadRecordRsp, error)
- func (s *Scheduler) ListAssetGroup(ctx context.Context, userID string, parent, limit int, offset int) (*types.ListAssetGroupRsp, error)
- func (s *Scheduler) ListAssetSummary(ctx context.Context, userID string, parent, limit, offset int) (*types.ListAssetSummaryRsp, error)
- func (s *Scheduler) ListAssets(ctx context.Context, userID string, limit, offset, groupID int) (*types.ListAssetRecordRsp, error)
- func (s *Scheduler) ListUserStorageStats(ctx context.Context, limit, offset int) (*types.ListStorageStatsRsp, error)
- func (s *Scheduler) LoadAWSData(ctx context.Context, limit, offset int, isDistribute bool) ([]*types.AWSDataInfo, error)
- func (s *Scheduler) MinioUploadFileEvent(ctx context.Context, event *types.MinioUploadFileEvent) error
- func (s *Scheduler) MoveAssetGroup(ctx context.Context, userID string, groupID, targetGroupID int) error
- func (s *Scheduler) MoveAssetToGroup(ctx context.Context, userID, cid string, groupID int) error
- func (s *Scheduler) NatPunch(ctx context.Context, target *types.NatPunchReq) error
- func (s *Scheduler) NodeExists(ctx context.Context, nodeID string) error
- func (s *Scheduler) NodeKeepalive(ctx context.Context) (uuid.UUID, error)
- func (s *Scheduler) NodeKeepaliveV2(ctx context.Context) (uuid.UUID, error)
- func (s *Scheduler) NodeLogin(ctx context.Context, nodeID, sign string) (string, error)
- func (s *Scheduler) NodeRemoveAssetResult(ctx context.Context, resultInfo types.RemoveAssetResult) error
- func (s *Scheduler) NodeValidationResult(ctx context.Context, r io.Reader, sign string) error
- func (s *Scheduler) PerformSyncData(ctx context.Context, nodeID string) error
- func (s *Scheduler) PullAsset(ctx context.Context, info *types.PullAssetReq) error
- func (s *Scheduler) ReDetermineNodeNATType(ctx context.Context, nodeID string) error
- func (s *Scheduler) RePullFailedAssets(ctx context.Context, hashes []types.AssetHash) error
- func (s *Scheduler) RedeployFailedProjects(ctx context.Context, ids []string) error
- func (s *Scheduler) RegisterCandidateNode(ctx context.Context, nodeID, publicKey, code string) (*types.ActivationDetail, error)
- func (s *Scheduler) RegisterEdgeNode(ctx context.Context, nodeID, publicKey string) (*types.ActivationDetail, error)
- func (s *Scheduler) RegisterNode(ctx context.Context, nodeID, publicKey string, nodeType types.NodeType) (*types.ActivationDetail, error)
- func (s *Scheduler) RemoveAssetRecord(ctx context.Context, cid string) error
- func (s *Scheduler) RemoveAssetReplica(ctx context.Context, cid, nodeID string) error
- func (s *Scheduler) RemoveNodeFailedReplica(ctx context.Context) error
- func (s *Scheduler) RenameAssetGroup(ctx context.Context, userID, newName string, groupID int) error
- func (s *Scheduler) RequestActivationCodes(ctx context.Context, nodeType types.NodeType, count int) ([]*types.NodeActivation, error)
- func (s *Scheduler) SetUserVIP(ctx context.Context, userID string, enableVIP bool) error
- func (s *Scheduler) ShareAssets(ctx context.Context, userID string, assetCIDs []string) (map[string]string, error)
- func (s *Scheduler) StartProject(ctx context.Context, req *types.ProjectReq) error
- func (s *Scheduler) StopAssetRecord(ctx context.Context, cids []string) error
- func (s *Scheduler) SubmitWorkloadReport(ctx context.Context, workload *types.WorkloadRecordReq) error
- func (s *Scheduler) SubmitWorkloadReportV2(ctx context.Context, workload *types.WorkloadRecordReq) error
- func (s *Scheduler) SwitchFillDiskTimer(ctx context.Context, open bool) error
- func (s *Scheduler) TriggerElection(ctx context.Context) error
- func (s *Scheduler) UndoNodeDeactivation(ctx context.Context, nodeID string) error
- func (s *Scheduler) UpdateAssetExpiration(ctx context.Context, cid string, t time.Time) error
- func (s *Scheduler) UpdateBandwidths(ctx context.Context, bandwidthDown, bandwidthUp int64) error
- func (s *Scheduler) UpdateNetFlows(ctx context.Context, total, up, down int64) error
- func (s *Scheduler) UpdateNodeDynamicInfo(ctx context.Context, info *types.NodeDynamicInfo) error
- func (s *Scheduler) UpdateNodePort(ctx context.Context, nodeID, port string) error
- func (s *Scheduler) UpdateProject(ctx context.Context, req *types.ProjectReq) error
- func (s *Scheduler) UpdateProjectStatus(ctx context.Context, list []*types.Project) error
- func (s *Scheduler) UpdateShareStatus(ctx context.Context, userID, assetCID string) error
- func (s *Scheduler) UpdateTunserverURL(ctx context.Context, nodeID string) error
- func (s *Scheduler) UserAPIKeysExists(ctx context.Context, userID string) error
- func (s *Scheduler) UserAssetDownloadResult(ctx context.Context, userID, cid string, totalTraffic, peakBandwidth int64) error
- func (s *Scheduler) VerifyTokenWithLimitCount(ctx context.Context, token string) (*types.JWTPayload, error)
Constants ¶
This section is empty.
Variables ¶
var FreeUpDayInterval = 1
Interval for initiating free space release
Functions ¶
This section is empty.
Types ¶
type EdgeUpdateManager ¶
type EdgeUpdateManager struct {
// contains filtered or unexported fields
}
EdgeUpdateManager manages information about edge node updates.
func NewEdgeUpdateManager ¶
func NewEdgeUpdateManager(db *db.SQLDB) (*EdgeUpdateManager, error)
NewEdgeUpdateManager creates a new EdgeUpdateManager with the given SQL database connection.
func (*EdgeUpdateManager) DeleteEdgeUpdateConfig ¶
func (eu *EdgeUpdateManager) DeleteEdgeUpdateConfig(ctx context.Context, nodeType int) error
DeleteEdgeUpdateConfig deletes the EdgeUpdateConfig for the given node type.
func (*EdgeUpdateManager) GetEdgeUpdateConfigs ¶
func (eu *EdgeUpdateManager) GetEdgeUpdateConfigs(ctx context.Context) (map[int]*api.EdgeUpdateConfig, error)
GetEdgeUpdateConfigs returns the map of edge node update information.
func (*EdgeUpdateManager) SetEdgeUpdateConfig ¶
func (eu *EdgeUpdateManager) SetEdgeUpdateConfig(ctx context.Context, info *api.EdgeUpdateConfig) error
SetEdgeUpdateConfig sets the EdgeUpdateConfig for the given node type.
type Scheduler ¶
type Scheduler struct { fx.In region.Region *common.CommonAPI *EdgeUpdateManager dtypes.ServerID NodeManager *node.Manager ValidationMgr *validation.Manager AssetManager *assets.Manager NatManager *nat.Manager DataSync *sSync.DataSync SchedulerCfg *config.SchedulerCfg SetSchedulerConfigFunc dtypes.SetSchedulerConfigFunc GetSchedulerConfigFunc dtypes.GetSchedulerConfigFunc WorkloadManager *workload.Manager ProjectManager *projects.Manager PrivateKey *rsa.PrivateKey Transport *quic.Transport }
Scheduler represents a scheduler node in a distributed system.
func (*Scheduler) AddAWSData ¶ added in v0.1.13
func (*Scheduler) AllocateStorage ¶ added in v0.1.10
AllocateStorage allocates storage space.
func (*Scheduler) AssignTunserverURL ¶ added in v0.1.19
AssignTunserverURL
func (*Scheduler) CalculateExitProfit ¶ added in v0.1.19
func (*Scheduler) CandidateCodeExist ¶ added in v0.1.19
func (*Scheduler) CandidateConnect ¶
CandidateConnect candidate node login to the scheduler
func (*Scheduler) CheckIpUsage ¶ added in v0.1.14
func (*Scheduler) CreateAPIKey ¶ added in v0.1.10
func (s *Scheduler) CreateAPIKey(ctx context.Context, userID, keyName string, perms []types.UserAccessControl) (string, error)
CreateAPIKey creates a key for the client API.
func (*Scheduler) CreateAsset ¶ added in v0.1.10
func (s *Scheduler) CreateAsset(ctx context.Context, req *types.CreateAssetReq) (*types.UploadInfo, error)
CreateAsset creates an asset with car CID, car name, and car size.
func (*Scheduler) CreateAssetGroup ¶ added in v0.1.11
func (s *Scheduler) CreateAssetGroup(ctx context.Context, userID, name string, parent int) (*types.AssetGroup, error)
CreateAssetGroup create file group
func (*Scheduler) DeactivateNode ¶ added in v0.1.11
DeactivateNode is used to deactivate a node in the titan server. It stops the node from serving any requests and marks it as inactive. - nodeID: The ID of the node to deactivate. - hours: The deactivation countdown time in hours. It specifies the duration before the deactivation is executed. If the deactivation is canceled within this period, the node will remain active.
func (*Scheduler) DeleteAPIKey ¶ added in v0.1.10
func (*Scheduler) DeleteAsset ¶ added in v0.1.10
DeleteAsset deletes the assets of the user.
func (*Scheduler) DeleteAssetGroup ¶ added in v0.1.11
DeleteAssetGroup delete asset group
func (*Scheduler) DeleteProject ¶ added in v0.1.19
func (*Scheduler) DeployProject ¶ added in v0.1.19
func (*Scheduler) DownloadDataResult ¶ added in v0.1.13
DownloadDataResult node download data result
func (*Scheduler) EdgeConnect ¶
EdgeConnect edge node login to the scheduler
func (*Scheduler) ElectValidators ¶ added in v0.1.13
ElectValidators elect validators
func (*Scheduler) FreeUpDiskSpace ¶ added in v0.1.19
func (s *Scheduler) FreeUpDiskSpace(ctx context.Context, nodeID string, size int64) (*types.FreeUpDiskResp, error)
FreeUpDiskSpace Request to free up disk space, returns file hashes and next time
func (*Scheduler) GenerateCandidateCode ¶ added in v0.1.19
func (*Scheduler) GetAPIKeys ¶ added in v0.1.10
func (s *Scheduler) GetAPIKeys(ctx context.Context, userID string) (map[string]types.UserAPIKeysInfo, error)
GetAPIKeys get all api key for user.
func (*Scheduler) GetAPPKeyPermissions ¶ added in v0.1.11
func (s *Scheduler) GetAPPKeyPermissions(ctx context.Context, userID string, keyName string) ([]string, error)
GetAPPKeyPermissions get the permission of user app key
func (*Scheduler) GetAssetCount ¶ added in v0.1.10
GetAssetCount retrieves a count of asset
func (*Scheduler) GetAssetListForBucket ¶
GetAssetListForBucket retrieves a list of asset hashes for the specified node's bucket.
func (*Scheduler) GetAssetRecord ¶
GetAssetRecord retrieves an asset record by its CID.
func (*Scheduler) GetAssetRecords ¶
func (s *Scheduler) GetAssetRecords(ctx context.Context, limit, offset int, statuses []string, serverID dtypes.ServerID) ([]*types.AssetRecord, error)
GetAssetRecords lists asset records with optional filtering by status, limit, and offset.
func (*Scheduler) GetAssetSourceDownloadInfo ¶ added in v0.1.18
func (*Scheduler) GetAssetStatus ¶ added in v0.1.11
func (s *Scheduler) GetAssetStatus(ctx context.Context, userID, assetCID string) (*types.AssetStatus, error)
GetAssetStatus retrieves a asset status
func (*Scheduler) GetAssetView ¶ added in v0.1.14
func (s *Scheduler) GetAssetView(ctx context.Context, nodeID string, isFromNode bool) (*types.AssetView, error)
GetAssetView get the asset view of node
func (*Scheduler) GetAssetsForNode ¶ added in v0.1.10
func (s *Scheduler) GetAssetsForNode(ctx context.Context, nodeID string, limit, offset int) (*types.ListNodeAssetRsp, error)
GetAssetsForNode retrieves a asset list of node
func (*Scheduler) GetAssetsInBucket ¶ added in v0.1.14
func (s *Scheduler) GetAssetsInBucket(ctx context.Context, nodeID string, bucketID int, isFromNode bool) ([]string, error)
GetAssetInBucket get the assets of the bucket
func (*Scheduler) GetCandidateCodeInfos ¶ added in v0.1.19
func (*Scheduler) GetCandidateDownloadInfos ¶
func (s *Scheduler) GetCandidateDownloadInfos(ctx context.Context, cid string) ([]*types.CandidateDownloadInfo, error)
GetCandidateDownloadInfos finds candidate download info for the given CID.
func (*Scheduler) GetCandidateIPs ¶ added in v0.1.11
func (*Scheduler) GetCandidateNodeIP ¶ added in v0.1.11
GetCandidateNodeIP get candidate ip for locator
func (*Scheduler) GetCandidateURLsForDetectNat ¶
func (*Scheduler) GetCurrentRegionInfos ¶ added in v0.1.19
func (*Scheduler) GetEdgeDownloadInfos ¶
func (s *Scheduler) GetEdgeDownloadInfos(ctx context.Context, cid string) (*types.EdgeDownloadInfoList, error)
GetEdgeDownloadInfos finds edge download information for a given CID
func (*Scheduler) GetEdgeExternalServiceAddress ¶
func (s *Scheduler) GetEdgeExternalServiceAddress(ctx context.Context, nodeID, candidateURL string) (string, error)
GetEdgeExternalServiceAddress returns the external service address of an edge node
func (*Scheduler) GetExternalAddress ¶
GetExternalAddress retrieves the external address of the caller.
func (*Scheduler) GetMinioConfigFromCandidate ¶ added in v0.1.11
func (*Scheduler) GetNextFreeTime ¶ added in v0.1.19
func (*Scheduler) GetNodeInfo ¶
GetNodeInfo returns information about the specified node.
func (*Scheduler) GetNodeList ¶
func (s *Scheduler) GetNodeList(ctx context.Context, offset int, limit int) (*types.ListNodesRsp, error)
GetNodeList retrieves a list of nodes with pagination.
func (*Scheduler) GetNodeOfIP ¶ added in v0.1.15
func (*Scheduler) GetNodeOnlineState ¶ added in v0.1.13
func (*Scheduler) GetNodePublicKey ¶ added in v0.1.11
GetNodePublicKey get node publicKey
func (*Scheduler) GetNodeToken ¶ added in v0.1.13
func (*Scheduler) GetNodeUploadInfo ¶ added in v0.1.19
func (*Scheduler) GetNodesFromRegion ¶ added in v0.1.19
func (*Scheduler) GetOnlineNodeCount ¶
GetOnlineNodeCount returns the count of online nodes for a given node type
func (*Scheduler) GetProfitDetailsForNode ¶ added in v0.1.18
func (s *Scheduler) GetProfitDetailsForNode(ctx context.Context, nodeID string, limit, offset int, ts []int) (*types.ListNodeProfitDetailsRsp, error)
GetReplicasForNode retrieves a asset list of node
func (*Scheduler) GetProjectInfo ¶ added in v0.1.19
func (*Scheduler) GetProjectInfos ¶ added in v0.1.19
func (*Scheduler) GetProjectsForNode ¶ added in v0.1.19
func (s *Scheduler) GetProjectsForNode(ctx context.Context, nodeID string) ([]*types.ProjectReplicas, error)
GetProjectsForNode
func (*Scheduler) GetReplicaEvents ¶ added in v0.1.11
func (s *Scheduler) GetReplicaEvents(ctx context.Context, start, end time.Time, limit, offset int) (*types.ListReplicaEventRsp, error)
GetReplicaEvents retrieves a replica event list
func (*Scheduler) GetReplicaEventsForNode ¶ added in v0.1.10
func (s *Scheduler) GetReplicaEventsForNode(ctx context.Context, nodeID string, limit, offset int) (*types.ListReplicaEventRsp, error)
GetReplicaEventsForNode retrieves a replica event list of node
func (*Scheduler) GetReplicas ¶ added in v0.1.11
func (s *Scheduler) GetReplicas(ctx context.Context, cid string, limit, offset int) (*types.ListReplicaRsp, error)
GetReplicas list asset replicas by CID.
func (*Scheduler) GetReplicasForNode ¶ added in v0.1.16
func (s *Scheduler) GetReplicasForNode(ctx context.Context, nodeID string, limit, offset int, statuses []types.ReplicaStatus) (*types.ListNodeReplicaRsp, error)
GetReplicasForNode retrieves a asset list of node
func (*Scheduler) GetRetrieveEventRecords ¶ added in v0.1.11
func (s *Scheduler) GetRetrieveEventRecords(ctx context.Context, nodeID string, limit, offset int) (*types.ListRetrieveEventRsp, error)
GetRetrieveEventRecords retrieves a list of retrieve events
func (*Scheduler) GetSchedulerPublicKey ¶
GetSchedulerPublicKey get server publicKey
func (*Scheduler) GetUserAccessToken ¶ added in v0.1.11
func (*Scheduler) GetUserInfo ¶ added in v0.1.11
GetUserInfo get user info
func (*Scheduler) GetUserInfos ¶ added in v0.1.11
func (s *Scheduler) GetUserInfos(ctx context.Context, userIDs []string) (map[string]*types.UserInfo, error)
GetUserInfos get user infos
func (*Scheduler) GetUserStorageStats ¶ added in v0.1.11
func (s *Scheduler) GetUserStorageStats(ctx context.Context, userID string) (*types.StorageStats, error)
GetUserStorageStats get user storage info
func (*Scheduler) GetValidationInfo ¶
GetValidationInfo get information related to validation and election
func (*Scheduler) GetValidationResults ¶
func (s *Scheduler) GetValidationResults(ctx context.Context, nodeID string, limit, offset int) (*types.ListValidationResultRsp, error)
GetValidationResults retrieves a list of validation results.
func (*Scheduler) GetWorkloadRecord ¶ added in v0.1.10
func (s *Scheduler) GetWorkloadRecord(ctx context.Context, id string) (*types.WorkloadRecord, error)
GetWorkloadRecord retrieves a list of workload results.
func (*Scheduler) GetWorkloadRecords ¶ added in v0.1.10
func (s *Scheduler) GetWorkloadRecords(ctx context.Context, nodeID string, limit, offset int) (*types.ListWorkloadRecordRsp, error)
GetWorkloadRecords retrieves a list of workload results.
func (*Scheduler) ListAssetGroup ¶ added in v0.1.11
func (s *Scheduler) ListAssetGroup(ctx context.Context, userID string, parent, limit int, offset int) (*types.ListAssetGroupRsp, error)
ListAssetGroup list file group
func (*Scheduler) ListAssetSummary ¶ added in v0.1.11
func (s *Scheduler) ListAssetSummary(ctx context.Context, userID string, parent, limit, offset int) (*types.ListAssetSummaryRsp, error)
ListAssetSummary list file group
func (*Scheduler) ListAssets ¶ added in v0.1.10
func (s *Scheduler) ListAssets(ctx context.Context, userID string, limit, offset, groupID int) (*types.ListAssetRecordRsp, error)
ListAssets lists the assets of the user.
func (*Scheduler) ListUserStorageStats ¶ added in v0.1.11
func (s *Scheduler) ListUserStorageStats(ctx context.Context, limit, offset int) (*types.ListStorageStatsRsp, error)
ListUserStorageStats list storage info
func (*Scheduler) LoadAWSData ¶ added in v0.1.14
func (*Scheduler) MinioUploadFileEvent ¶ added in v0.1.11
func (*Scheduler) MoveAssetGroup ¶ added in v0.1.11
func (s *Scheduler) MoveAssetGroup(ctx context.Context, userID string, groupID, targetGroupID int) error
MoveAssetGroup move a asset group
func (*Scheduler) MoveAssetToGroup ¶ added in v0.1.11
MoveAssetToGroup move a file to group
func (*Scheduler) NodeExists ¶
NodeExists checks if the node with the specified ID exists.
func (*Scheduler) NodeKeepalive ¶
NodeKeepalive candidate and edge keepalive
func (*Scheduler) NodeKeepaliveV2 ¶ added in v0.1.11
NodeKeepaliveV2 candidate and edge keepalive
func (*Scheduler) NodeRemoveAssetResult ¶
func (s *Scheduler) NodeRemoveAssetResult(ctx context.Context, resultInfo types.RemoveAssetResult) error
NodeRemoveAssetResult updates a node's disk usage and block count based on the resultInfo.
func (*Scheduler) NodeValidationResult ¶
NodeValidationResult processes the validation result for a node
func (*Scheduler) PerformSyncData ¶ added in v0.1.18
func (*Scheduler) ReDetermineNodeNATType ¶ added in v0.1.19
func (*Scheduler) RePullFailedAssets ¶
RePullFailedAssets retries the pull process for a list of failed assets
func (*Scheduler) RedeployFailedProjects ¶ added in v0.1.19
RedeployFailedProjects retries the deploy process for a list of failed projects
func (*Scheduler) RegisterCandidateNode ¶ added in v0.1.19
func (s *Scheduler) RegisterCandidateNode(ctx context.Context, nodeID, publicKey, code string) (*types.ActivationDetail, error)
RegisterCandidateNode register node
func (*Scheduler) RegisterEdgeNode ¶ added in v0.1.11
func (s *Scheduler) RegisterEdgeNode(ctx context.Context, nodeID, publicKey string) (*types.ActivationDetail, error)
RegisterEdgeNode register edge node, return key
func (*Scheduler) RegisterNode ¶
func (s *Scheduler) RegisterNode(ctx context.Context, nodeID, publicKey string, nodeType types.NodeType) (*types.ActivationDetail, error)
RegisterNode register node
func (*Scheduler) RemoveAssetRecord ¶
RemoveAssetRecord removes an asset record from the system by its CID.
func (*Scheduler) RemoveAssetReplica ¶
RemoveAssetReplica removes an asset replica from the system by its CID and nodeID.
func (*Scheduler) RemoveNodeFailedReplica ¶ added in v0.1.16
func (*Scheduler) RenameAssetGroup ¶ added in v0.1.11
func (s *Scheduler) RenameAssetGroup(ctx context.Context, userID, newName string, groupID int) error
RenameAssetGroup rename group
func (*Scheduler) RequestActivationCodes ¶ added in v0.1.10
func (s *Scheduler) RequestActivationCodes(ctx context.Context, nodeType types.NodeType, count int) ([]*types.NodeActivation, error)
RequestActivationCodes request node activation codes
func (*Scheduler) SetUserVIP ¶ added in v0.1.11
func (*Scheduler) ShareAssets ¶ added in v0.1.10
func (s *Scheduler) ShareAssets(ctx context.Context, userID string, assetCIDs []string) (map[string]string, error)
ShareAssets shares the assets of the user.
func (*Scheduler) StartProject ¶ added in v0.1.19
func (*Scheduler) StopAssetRecord ¶ added in v0.1.14
StopAssetRecord stop an asset record from the system by its CID.
func (*Scheduler) SubmitWorkloadReport ¶ added in v0.1.18
func (s *Scheduler) SubmitWorkloadReport(ctx context.Context, workload *types.WorkloadRecordReq) error
SubmitWorkloadReport
func (*Scheduler) SubmitWorkloadReportV2 ¶ added in v0.1.18
func (*Scheduler) SwitchFillDiskTimer ¶ added in v0.1.13
func (*Scheduler) TriggerElection ¶
TriggerElection triggers a single election for validators.
func (*Scheduler) UndoNodeDeactivation ¶ added in v0.1.11
UndoNodeDeactivation is used to undo the deactivation of a node in the titan server. It allows the previously deactivated node to start serving requests again.
func (*Scheduler) UpdateAssetExpiration ¶
UpdateAssetExpiration resets the expiration time of an asset record based on the provided CID and new expiration time.
func (*Scheduler) UpdateBandwidths ¶ added in v0.1.11
UpdateBandwidths update bandwidths
func (*Scheduler) UpdateNetFlows ¶ added in v0.1.19
UpdateNetFlows update node net flow total,up,down usage
func (*Scheduler) UpdateNodeDynamicInfo ¶ added in v0.1.19
func (*Scheduler) UpdateNodePort ¶
UpdateNodePort sets the port for the specified node.
func (*Scheduler) UpdateProject ¶ added in v0.1.19
func (*Scheduler) UpdateProjectStatus ¶ added in v0.1.19
func (*Scheduler) UpdateShareStatus ¶ added in v0.1.11
func (*Scheduler) UpdateTunserverURL ¶ added in v0.1.19
func (*Scheduler) UserAPIKeysExists ¶ added in v0.1.10
UserAPIKeysExists checks if the user exists.
func (*Scheduler) UserAssetDownloadResult ¶ added in v0.1.11
func (s *Scheduler) UserAssetDownloadResult(ctx context.Context, userID, cid string, totalTraffic, peakBandwidth int64) error
UserAssetDownloadResult download result
func (*Scheduler) VerifyTokenWithLimitCount ¶ added in v0.1.11
func (s *Scheduler) VerifyTokenWithLimitCount(ctx context.Context, token string) (*types.JWTPayload, error)
VerifyTokenWithLimitCount verify token in limit count