Documentation
¶
Index ¶
- Constants
- 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) AddDeploymentDomain(ctx context.Context, id types.DeploymentID, cert *types.Certificate) 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) CloseDeployment(ctx context.Context, deployment *types.Deployment, force bool) error
- func (s *Scheduler) CreateAsset(ctx context.Context, req *types.CreateAssetReq) (*types.UploadInfo, error)
- func (s *Scheduler) CreateDeployment(ctx context.Context, deployment *types.Deployment) error
- func (s *Scheduler) CreateSyncAsset(ctx context.Context, req *types.CreateSyncAssetReq) error
- func (s *Scheduler) CreateTunnel(ctx context.Context, req *types.CreateTunnelReq) error
- func (s *Scheduler) DeactivateNode(ctx context.Context, nodeID string, hours int) error
- func (s *Scheduler) DeleteDeploymentDomain(ctx context.Context, id types.DeploymentID, domain string) 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) FreeUpDiskSpace(ctx context.Context, nodeID string, size int64) (*types.FreeUpDiskResp, error)
- func (s *Scheduler) GenerateCandidateCodes(ctx context.Context, count int, nodeType types.NodeType, isTest bool) ([]string, error)
- func (s *Scheduler) GenerateTokenForDownloadSource(ctx context.Context, nodeID string, cid string) (*types.SourceDownloadInfo, 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) 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) GetDeploymentDomains(ctx context.Context, id types.DeploymentID) ([]*types.DeploymentDomain, error)
- func (s *Scheduler) GetDeploymentList(ctx context.Context, opt *types.GetDeploymentOption) (*types.GetDeploymentListResp, error)
- func (s *Scheduler) GetDeploymentProviderIP(ctx context.Context, id types.DeploymentID) (string, error)
- func (s *Scheduler) GetDownloadInfos(cid string, needCandidate bool) (*types.AssetSourceDownloadInfoRsp, int64, 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) GetEvents(ctx context.Context, deployment *types.Deployment) ([]*types.ServiceEvent, error)
- func (s *Scheduler) GetExternalAddress(ctx context.Context) (string, error)
- func (s *Scheduler) GetIngress(ctx context.Context, id types.DeploymentID) (*types.Ingress, error)
- func (s *Scheduler) GetLeaseShellEndpoint(ctx context.Context, id types.DeploymentID) (*types.LeaseEndpoint, error)
- func (s *Scheduler) GetLogs(ctx context.Context, deployment *types.Deployment) ([]*types.ServiceLog, 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) GetProviderList(ctx context.Context, opt *types.GetProviderOption) ([]*types.Provider, error)
- func (s *Scheduler) GetRemoteAddress(ctx context.Context) (string, 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) GetStatistics(ctx context.Context, id string) (*types.ResourcesStatistics, error)
- func (s *Scheduler) GetTunserverURLFromUser(ctx context.Context, req *types.TunserverReq) (*types.TunserverRsp, 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) L5Connect(ctx context.Context, opts *types.ConnectOptions) 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) 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) ReimburseNodeProfit(ctx context.Context, nodeID, note string, profit float64) 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) RemoveCandidateCode(ctx context.Context, code string) error
- func (s *Scheduler) RemoveNodeFailedReplica(ctx context.Context) error
- func (s *Scheduler) RequestActivationCodes(ctx context.Context, nodeType types.NodeType, count int) ([]*types.NodeActivation, error)
- func (s *Scheduler) ResetCandidateCode(ctx context.Context, nodeID, code string) error
- func (s *Scheduler) SetProperties(ctx context.Context, properties *types.Properties) error
- func (s *Scheduler) SetTunserverURL(ctx context.Context, nodeID, wsNodeID string) 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) SubmitProjectReport(ctx context.Context, req *types.ProjectRecordReq) 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) UpdateDeployment(ctx context.Context, deployment *types.Deployment) error
- func (s *Scheduler) UpdateIngress(ctx context.Context, id types.DeploymentID, annotations map[string]string) 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) UpdateTunserverURL(ctx context.Context, nodeID 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 ¶
const ( StateInvalid = "Invalid" StateOk = "OK" )
Variables ¶
var ( ErrDeploymentNotFound = errors.New("deployment not found") ErrDomainAlreadyExist = errors.New("domain already exist") ErrInvalidDomain = errors.New("invalid domain") ErrInvalidAnnotations = errors.New("invalid annotations") )
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
ContainerManager *container.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) AddDeploymentDomain ¶ added in v0.1.21
func (s *Scheduler) AddDeploymentDomain(ctx context.Context, id types.DeploymentID, cert *types.Certificate) error
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) CloseDeployment ¶ added in v0.1.21
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) CreateDeployment ¶ added in v0.1.21
func (*Scheduler) CreateSyncAsset ¶ added in v0.1.21
CreateSyncAsset Synchronizing assets from other schedulers
func (*Scheduler) CreateTunnel ¶ added in v0.1.21
CreateTunnel create tunnel for workerd communication
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) DeleteDeploymentDomain ¶ added in v0.1.21
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) 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) GenerateCandidateCodes ¶ added in v0.1.21
func (*Scheduler) GenerateTokenForDownloadSource ¶ added in v0.1.21
func (s *Scheduler) GenerateTokenForDownloadSource(ctx context.Context, nodeID string, cid string) (*types.SourceDownloadInfo, error)
GenerateTokenForDownloadSource Generate Token For Download Source
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) 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) GetDeploymentDomains ¶ added in v0.1.21
func (s *Scheduler) GetDeploymentDomains(ctx context.Context, id types.DeploymentID) ([]*types.DeploymentDomain, error)
func (*Scheduler) GetDeploymentList ¶ added in v0.1.21
func (s *Scheduler) GetDeploymentList(ctx context.Context, opt *types.GetDeploymentOption) (*types.GetDeploymentListResp, error)
func (*Scheduler) GetDeploymentProviderIP ¶ added in v0.1.21
func (*Scheduler) GetDownloadInfos ¶ added in v0.1.21
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) GetEvents ¶ added in v0.1.21
func (s *Scheduler) GetEvents(ctx context.Context, deployment *types.Deployment) ([]*types.ServiceEvent, error)
func (*Scheduler) GetExternalAddress ¶
GetExternalAddress retrieves the external address of the caller.
func (*Scheduler) GetIngress ¶ added in v0.1.21
func (*Scheduler) GetLeaseShellEndpoint ¶ added in v0.1.21
func (s *Scheduler) GetLeaseShellEndpoint(ctx context.Context, id types.DeploymentID) (*types.LeaseEndpoint, error)
func (*Scheduler) GetLogs ¶ added in v0.1.21
func (s *Scheduler) GetLogs(ctx context.Context, deployment *types.Deployment) ([]*types.ServiceLog, error)
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) GetProviderList ¶ added in v0.1.21
func (*Scheduler) GetRemoteAddress ¶ added in v0.1.21
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) GetStatistics ¶ added in v0.1.21
func (*Scheduler) GetTunserverURLFromUser ¶ added in v0.1.21
func (s *Scheduler) GetTunserverURLFromUser(ctx context.Context, req *types.TunserverReq) (*types.TunserverRsp, error)
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) LoadAWSData ¶ added in v0.1.14
func (*Scheduler) MinioUploadFileEvent ¶ added in v0.1.11
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) ReimburseNodeProfit ¶ added in v0.1.21
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) RemoveCandidateCode ¶ added in v0.1.21
func (*Scheduler) RemoveNodeFailedReplica ¶ added in v0.1.16
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) ResetCandidateCode ¶ added in v0.1.21
func (*Scheduler) SetProperties ¶ added in v0.1.21
func (*Scheduler) SetTunserverURL ¶ added in v0.1.21
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) SubmitProjectReport ¶ added in v0.1.21
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) UpdateDeployment ¶ added in v0.1.21
func (*Scheduler) UpdateIngress ¶ added in v0.1.21
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) UpdateTunserverURL ¶ added in v0.1.19
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