Documentation ¶
Index ¶
- type V1
- func (v *V1) AnnounceHost(ctx context.Context, req *schedulerv1.AnnounceHostRequest) error
- func (v *V1) AnnounceTask(ctx context.Context, req *schedulerv1.AnnounceTaskRequest) error
- func (v *V1) LeaveHost(ctx context.Context, req *schedulerv1.LeaveHostRequest) error
- func (v *V1) LeaveTask(ctx context.Context, req *schedulerv1.PeerTarget) error
- func (v *V1) RegisterPeerTask(ctx context.Context, req *schedulerv1.PeerTaskRequest) (*schedulerv1.RegisterResult, error)
- func (v *V1) ReportPeerResult(ctx context.Context, req *schedulerv1.PeerResult) error
- func (v *V1) ReportPieceResult(stream schedulerv1.Scheduler_ReportPieceResultServer) error
- func (v *V1) StatTask(ctx context.Context, req *schedulerv1.StatTaskRequest) (*schedulerv1.Task, error)
- type V2
- func (v *V2) AnnounceHost(ctx context.Context, req *schedulerv2.AnnounceHostRequest) error
- func (v *V2) AnnouncePeer(stream schedulerv2.Scheduler_AnnouncePeerServer) error
- func (v *V2) AnnouncePersistentCachePeer(stream schedulerv2.Scheduler_AnnouncePersistentCachePeerServer) error
- func (v *V2) DeleteHost(ctx context.Context, req *schedulerv2.DeleteHostRequest) error
- func (v *V2) DeletePeer(ctx context.Context, req *schedulerv2.DeletePeerRequest) error
- func (v *V2) DeletePersistentCachePeer(ctx context.Context, req *schedulerv2.DeletePersistentCachePeerRequest) error
- func (v *V2) DeletePersistentCacheTask(ctx context.Context, req *schedulerv2.DeletePersistentCacheTaskRequest) error
- func (v *V2) DeleteTask(ctx context.Context, req *schedulerv2.DeleteTaskRequest) error
- func (v *V2) ListHosts(ctx context.Context) (*schedulerv2.ListHostsResponse, error)
- func (v *V2) StatPeer(ctx context.Context, req *schedulerv2.StatPeerRequest) (*commonv2.Peer, error)
- func (v *V2) StatPersistentCachePeer(ctx context.Context, req *schedulerv2.StatPersistentCachePeerRequest) (*commonv2.PersistentCachePeer, error)
- func (v *V2) StatPersistentCacheTask(ctx context.Context, req *schedulerv2.StatPersistentCacheTaskRequest) (*commonv2.PersistentCacheTask, error)
- func (v *V2) StatTask(ctx context.Context, req *schedulerv2.StatTaskRequest) (*commonv2.Task, error)
- func (v *V2) UploadPersistentCacheTaskFailed(ctx context.Context, req *schedulerv2.UploadPersistentCacheTaskFailedRequest) error
- func (v *V2) UploadPersistentCacheTaskFinished(ctx context.Context, req *schedulerv2.UploadPersistentCacheTaskFinishedRequest) (*commonv2.PersistentCacheTask, error)
- func (v *V2) UploadPersistentCacheTaskStarted(ctx context.Context, req *schedulerv2.UploadPersistentCacheTaskStartedRequest) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type V1 ¶ added in v2.0.9
type V1 struct {
// contains filtered or unexported fields
}
V1 is the interface for v1 version of the service.
func NewV1 ¶ added in v2.0.9
func NewV1( cfg *config.Config, resource resource.Resource, scheduling scheduling.Scheduling, dynconfig config.DynconfigInterface, ) *V1
New v1 version of service instance.
func (*V1) AnnounceHost ¶ added in v2.0.9
func (v *V1) AnnounceHost(ctx context.Context, req *schedulerv1.AnnounceHostRequest) error
AnnounceHost announces host to scheduler.
func (*V1) AnnounceTask ¶ added in v2.0.9
func (v *V1) AnnounceTask(ctx context.Context, req *schedulerv1.AnnounceTaskRequest) error
AnnounceTask informs scheduler a peer has completed task.
func (*V1) LeaveHost ¶ added in v2.0.9
func (v *V1) LeaveHost(ctx context.Context, req *schedulerv1.LeaveHostRequest) error
LeaveHost releases host in scheduler.
func (*V1) LeaveTask ¶ added in v2.0.9
func (v *V1) LeaveTask(ctx context.Context, req *schedulerv1.PeerTarget) error
LeaveTask releases peer in scheduler.
func (*V1) RegisterPeerTask ¶ added in v2.0.9
func (v *V1) RegisterPeerTask(ctx context.Context, req *schedulerv1.PeerTaskRequest) (*schedulerv1.RegisterResult, error)
RegisterPeerTask registers peer and triggers seed peer download task.
func (*V1) ReportPeerResult ¶ added in v2.0.9
func (v *V1) ReportPeerResult(ctx context.Context, req *schedulerv1.PeerResult) error
ReportPeerResult handles peer result reported by dfdaemon.
func (*V1) ReportPieceResult ¶ added in v2.0.9
func (v *V1) ReportPieceResult(stream schedulerv1.Scheduler_ReportPieceResultServer) error
ReportPieceResult handles the piece information reported by dfdaemon.
func (*V1) StatTask ¶ added in v2.0.9
func (v *V1) StatTask(ctx context.Context, req *schedulerv1.StatTaskRequest) (*schedulerv1.Task, error)
StatTask checks the current state of the task.
type V2 ¶ added in v2.0.9
type V2 struct {
// contains filtered or unexported fields
}
V2 is the interface for v2 version of the service.
func NewV2 ¶ added in v2.0.9
func NewV2( cfg *config.Config, resource standard.Resource, persistentCacheResource persistentcache.Resource, scheduling scheduling.Scheduling, dynconfig config.DynconfigInterface, ) *V2
New v2 version of service instance.
func (*V2) AnnounceHost ¶ added in v2.0.9
func (v *V2) AnnounceHost(ctx context.Context, req *schedulerv2.AnnounceHostRequest) error
AnnounceHost announces host to scheduler.
func (*V2) AnnouncePeer ¶ added in v2.0.9
func (v *V2) AnnouncePeer(stream schedulerv2.Scheduler_AnnouncePeerServer) error
AnnouncePeer announces peer to scheduler.
func (*V2) AnnouncePersistentCachePeer ¶ added in v2.1.60
func (v *V2) AnnouncePersistentCachePeer(stream schedulerv2.Scheduler_AnnouncePersistentCachePeerServer) error
TODO Implement the following methods. AnnouncePersistentCachePeer announces persistent cache peer to scheduler.
func (*V2) DeleteHost ¶ added in v2.1.49
func (v *V2) DeleteHost(ctx context.Context, req *schedulerv2.DeleteHostRequest) error
DeleteHost releases host in scheduler.
func (*V2) DeletePeer ¶ added in v2.1.49
func (v *V2) DeletePeer(ctx context.Context, req *schedulerv2.DeletePeerRequest) error
DeletePeer releases peer in scheduler.
func (*V2) DeletePersistentCachePeer ¶ added in v2.1.60
func (v *V2) DeletePersistentCachePeer(ctx context.Context, req *schedulerv2.DeletePersistentCachePeerRequest) error
DeletePersistentCachePeer releases persistent cache peer in scheduler.
func (*V2) DeletePersistentCacheTask ¶ added in v2.1.60
func (v *V2) DeletePersistentCacheTask(ctx context.Context, req *schedulerv2.DeletePersistentCacheTaskRequest) error
DeletePersistentCacheTask releases persistent cache task in scheduler.
func (*V2) DeleteTask ¶ added in v2.1.49
func (v *V2) DeleteTask(ctx context.Context, req *schedulerv2.DeleteTaskRequest) error
DeleteTask releases task in scheduler.
func (*V2) ListHosts ¶ added in v2.1.62
func (v *V2) ListHosts(ctx context.Context) (*schedulerv2.ListHostsResponse, error)
ListHosts lists hosts in scheduler.
func (*V2) StatPeer ¶ added in v2.0.9
func (v *V2) StatPeer(ctx context.Context, req *schedulerv2.StatPeerRequest) (*commonv2.Peer, error)
StatPeer checks information of peer.
func (*V2) StatPersistentCachePeer ¶ added in v2.1.60
func (v *V2) StatPersistentCachePeer(ctx context.Context, req *schedulerv2.StatPersistentCachePeerRequest) (*commonv2.PersistentCachePeer, error)
StatPersistentCachePeer checks information of persistent cache peer.
func (*V2) StatPersistentCacheTask ¶ added in v2.1.60
func (v *V2) StatPersistentCacheTask(ctx context.Context, req *schedulerv2.StatPersistentCacheTaskRequest) (*commonv2.PersistentCacheTask, error)
StatPersistentCacheTask checks information of persistent cache task.
func (*V2) StatTask ¶ added in v2.0.9
func (v *V2) StatTask(ctx context.Context, req *schedulerv2.StatTaskRequest) (*commonv2.Task, error)
StatTask checks information of task.
func (*V2) UploadPersistentCacheTaskFailed ¶ added in v2.1.60
func (v *V2) UploadPersistentCacheTaskFailed(ctx context.Context, req *schedulerv2.UploadPersistentCacheTaskFailedRequest) error
UploadPersistentCacheTaskFailed uploads the metadata of the persistent cache task failed.
func (*V2) UploadPersistentCacheTaskFinished ¶ added in v2.1.60
func (v *V2) UploadPersistentCacheTaskFinished(ctx context.Context, req *schedulerv2.UploadPersistentCacheTaskFinishedRequest) (*commonv2.PersistentCacheTask, error)
UploadPersistentCacheTaskFinished uploads the metadata of the persistent cache task finished.
func (*V2) UploadPersistentCacheTaskStarted ¶ added in v2.1.60
func (v *V2) UploadPersistentCacheTaskStarted(ctx context.Context, req *schedulerv2.UploadPersistentCacheTaskStartedRequest) error
UploadPersistentCacheTaskStarted uploads the metadata of the persistent cache task started.