service

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2026 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Index

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,
	persistentResource persistent.Resource,
	persistentCacheResource persistentcache.Resource,
	scheduling scheduling.Scheduling,
	job job.Job,
	internalJobImage internaljob.Image,
	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

AnnouncePersistentCachePeer announces persistent cache peer to scheduler.

func (*V2) AnnouncePersistentPeer added in v2.4.0

func (v *V2) AnnouncePersistentPeer(stream schedulerv2.Scheduler_AnnouncePersistentPeerServer) error

AnnouncePersistentPeer announces persistent 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) DeletePersistentPeer added in v2.4.0

func (v *V2) DeletePersistentPeer(_ctx context.Context, req *schedulerv2.DeletePersistentPeerRequest) error

DeletePersistentPeer releases persistent peer in scheduler.

func (*V2) DeletePersistentTask added in v2.4.0

func (v *V2) DeletePersistentTask(_ctx context.Context, req *schedulerv2.DeletePersistentTaskRequest) error

DeletePersistentTask releases persistent 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

ListHosts lists hosts in scheduler.

func (*V2) PreheatFile added in v2.3.4

func (v *V2) PreheatFile(ctx context.Context, req *schedulerv2.PreheatFileRequest) error

PreheatFile synchronously triggers an asynchronous preheat task for a file.

This is a blocking call. The RPC will not return until the server has completed the initial synchronous work: preparing the file URL.

After this call successfully returns, a scheduler on the server begins the actual preheating process, instructing peers to download the file in the background.

A successful response (google.protobuf.Empty) confirms that the preparation is complete and the asynchronous download task has been scheduled.

func (*V2) PreheatImage added in v2.3.1

func (v *V2) PreheatImage(ctx context.Context, req *schedulerv2.PreheatImageRequest) error

PreheatImage synchronously resolves an image manifest and triggers an asynchronous preheat task.

This is a blocking call. The RPC will not return until the server has completed the initial synchronous work: resolving the image manifest and preparing all layer URLs.

After this call successfully returns, a scheduler on the server begins the actual preheating process, instructing peers to download the layers in the background.

A successful response (google.protobuf.Empty) confirms that the preparation is complete and the asynchronous download task has been scheduled.

func (*V2) StatFile added in v2.3.4

StatFile provides detailed status for files distribution in peers.

This is a blocking call that first queries the file/dir entries and then queries all peers to collect the file's download state across the network. The response includes the file status on each peer.

func (*V2) StatImage added in v2.3.1

StatImage provides detailed status for a container image's distribution in peers.

This is a blocking call that first resolves the image manifest and then queries all peers to collect the image's download state across the network. The response includes both layer information and the status on each peer.

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

StatPersistentCachePeer checks information of persistent cache peer.

func (*V2) StatPersistentCacheTask added in v2.1.60

StatPersistentCacheTask checks information of persistent cache task.

func (*V2) StatPersistentPeer added in v2.4.0

func (v *V2) StatPersistentPeer(ctx context.Context, req *schedulerv2.StatPersistentPeerRequest) (*commonv2.PersistentPeer, error)

StatPersistentPeer checks information of persistent peer.

func (*V2) StatPersistentTask added in v2.4.0

func (v *V2) StatPersistentTask(ctx context.Context, req *schedulerv2.StatPersistentTaskRequest) (*commonv2.PersistentTask, error)

StatPersistentTask checks information of persistent 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.

func (*V2) UploadPersistentTaskFailed added in v2.4.0

func (v *V2) UploadPersistentTaskFailed(ctx context.Context, req *schedulerv2.UploadPersistentTaskFailedRequest) error

UploadPersistentTaskFailed uploads the metadata of the persistent task failed.

func (*V2) UploadPersistentTaskFinished added in v2.4.0

func (v *V2) UploadPersistentTaskFinished(ctx context.Context, req *schedulerv2.UploadPersistentTaskFinishedRequest) (*commonv2.PersistentTask, error)

UploadPersistentTaskFinished uploads the metadata of the persistent task finished.

func (*V2) UploadPersistentTaskStarted added in v2.4.0

func (v *V2) UploadPersistentTaskStarted(ctx context.Context, req *schedulerv2.UploadPersistentTaskStartedRequest) error

UploadPersistentTaskStarted uploads the metadata of the persistent task started.

Jump to

Keyboard shortcuts

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