rpcserver

package
v2.0.2-rc.14 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New added in v2.0.1

func New(service *service.Service, opts ...grpc.ServerOption) *grpc.Server

New returns a new transparent scheduler server from the given options

Types

type Server added in v2.0.2

type Server struct {

	// GRPC UnimplementedSchedulerServer interface
	scheduler.UnimplementedSchedulerServer
	// contains filtered or unexported fields
}

Server is grpc sercer

func (*Server) LeaveTask added in v2.0.2

func (s *Server) LeaveTask(ctx context.Context, req *scheduler.PeerTarget) (*empty.Empty, error)

LeaveTask makes the peer unschedulable

func (*Server) RegisterPeerTask added in v2.0.2

func (s *Server) RegisterPeerTask(ctx context.Context, req *scheduler.PeerTaskRequest) (*scheduler.RegisterResult, error)

RegisterPeerTask registers peer and triggers CDN download task

func (*Server) ReportPeerResult added in v2.0.2

func (s *Server) ReportPeerResult(ctx context.Context, req *scheduler.PeerResult) (*empty.Empty, error)

ReportPeerResult handles peer result reported by dfdaemon

func (*Server) ReportPieceResult added in v2.0.2

func (s *Server) ReportPieceResult(stream scheduler.Scheduler_ReportPieceResultServer) error

ReportPieceResult handles the piece information reported by dfdaemon

Jump to

Keyboard shortcuts

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