service

package
v2.1.50 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: Apache-2.0 Imports: 34 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,
	storage storage.Storage,
	networktopology networktopology.NetworkTopology,
) *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.

func (*V1) SyncProbes added in v2.0.30

func (v *V1) SyncProbes(stream schedulerv1.Scheduler_SyncProbesServer) error

SyncProbes sync probes of the host.

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 resource.Resource,
	scheduling scheduling.Scheduling,
	dynconfig config.DynconfigInterface,
	storage storage.Storage,
	networkTopology networktopology.NetworkTopology,
) *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) 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) DeleteTask added in v2.1.49

func (v *V2) DeleteTask(ctx context.Context, req *schedulerv2.DeleteTaskRequest) error

DeleteTask releases task 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) 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) SyncProbes added in v2.0.30

func (v *V2) SyncProbes(stream schedulerv2.Scheduler_SyncProbesServer) error

SyncProbes sync probes of the host.

Jump to

Keyboard shortcuts

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