service

package
v0.1.0-beta-3 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SchedulerService

type SchedulerService struct {
	CDNManager  *manager.CDNManager
	TaskManager *manager.TaskManager
	HostManager *manager.HostManager
	Scheduler   *scheduler.Scheduler

	ABTest bool
	// contains filtered or unexported fields
}

func NewSchedulerService

func NewSchedulerService(cfg *config.Config, dynconfig config.DynconfigInterface) (*SchedulerService, error)

func (*SchedulerService) AddHost

func (s *SchedulerService) AddHost(host *types.Host) (ret *types.Host, err error)

func (*SchedulerService) AddPeerTask

func (s *SchedulerService) AddPeerTask(pid string, task *types.Task, host *types.Host) (ret *types.PeerTask, err error)

func (*SchedulerService) AddTask

func (s *SchedulerService) AddTask(task *types.Task) (*types.Task, error)

func (*SchedulerService) DeletePeerTask

func (s *SchedulerService) DeletePeerTask(peerTaskID string) (err error)

func (*SchedulerService) GenerateTaskID

func (s *SchedulerService) GenerateTaskID(url string, filter string, meta *base.UrlMeta, bizID string, peerID string) (taskID string)

func (*SchedulerService) GetHost

func (s *SchedulerService) GetHost(hostID string) (host *types.Host, err error)

func (*SchedulerService) GetPeerTask

func (s *SchedulerService) GetPeerTask(peerTaskID string) (peerTask *types.PeerTask, err error)

func (*SchedulerService) GetTask

func (s *SchedulerService) GetTask(taskID string) (*types.Task, bool)

func (*SchedulerService) ScheduleChildren

func (s *SchedulerService) ScheduleChildren(task *types.PeerTask) (children []*types.PeerTask, err error)

func (*SchedulerService) ScheduleParent

func (s *SchedulerService) ScheduleParent(task *types.PeerTask) (primary *types.PeerTask,
	secondary []*types.PeerTask, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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