Documentation ¶
Index ¶
- type Option
- type SchedulerServer
- func (s *SchedulerServer) LeaveTask(ctx context.Context, target *scheduler.PeerTarget) (err error)
- func (s *SchedulerServer) RegisterPeerTask(ctx context.Context, request *scheduler.PeerTaskRequest) (pkg *scheduler.RegisterResult, err error)
- func (s *SchedulerServer) ReportPeerResult(ctx context.Context, result *scheduler.PeerResult) (err error)
- func (s *SchedulerServer) ReportPieceResult(stream scheduler.Scheduler_ReportPieceResultServer) (err error)
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(p *SchedulerServer) *SchedulerServer
Option is a functional option for configuring the scheduler
func WithSchedulerService ¶
func WithSchedulerService(service *service.SchedulerService) Option
WithSchedulerService sets the *service.SchedulerService
type SchedulerServer ¶
type SchedulerServer struct {
// contains filtered or unexported fields
}
func NewSchedulerServer ¶
func NewSchedulerServer(cfg *config.Config, options ...Option) *SchedulerServer
NewSchedulerServer returns a new transparent scheduler server from the given options
func NewSchedulerWithOptions ¶
func NewSchedulerWithOptions(cfg *config.Config, options ...Option) *SchedulerServer
NewSchedulerWithOptions constructs a new instance of a scheduler server with additional options.
func (*SchedulerServer) LeaveTask ¶
func (s *SchedulerServer) LeaveTask(ctx context.Context, target *scheduler.PeerTarget) (err error)
func (*SchedulerServer) RegisterPeerTask ¶
func (s *SchedulerServer) RegisterPeerTask(ctx context.Context, request *scheduler.PeerTaskRequest) (pkg *scheduler.RegisterResult, err error)
func (*SchedulerServer) ReportPeerResult ¶
func (s *SchedulerServer) ReportPeerResult(ctx context.Context, result *scheduler.PeerResult) (err error)
func (*SchedulerServer) ReportPieceResult ¶
func (s *SchedulerServer) ReportPieceResult(stream scheduler.Scheduler_ReportPieceResultServer) (err error)
Click to show internal directories.
Click to hide internal directories.