taskhandler

package
v0.0.0-...-3589e54 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(config *config.Config) *Service

func (*Service) AddNodeTask

func (s *Service) AddNodeTask(list []*service.NodeTask) error

func (*Service) DeleteNodeSource

func (s *Service) DeleteNodeSource(list []int64) error

func (*Service) GetNodeInfo

func (s *Service) GetNodeInfo() (map[string][]string, []string, error)

func (*Service) GetNodeTaskCountByNodeId

func (s *Service) GetNodeTaskCountByNodeId(nodeId string) int64

func (*Service) GetNodeTaskCountWithIng

func (s *Service) GetNodeTaskCountWithIng(codes []string, nodeMp map[string][]string, log *logrus.Entry) ([]string, map[string][]string)

func (*Service) GetNodeTaskCountWithMap

func (s *Service) GetNodeTaskCountWithMap() map[string]int64

func (*Service) GetTaskForExec

func (s *Service) GetTaskForExec(codes []string) ([]*service.NodeSource, error)

func (*Service) RebuildWeight

func (s *Service) RebuildWeight(nodeId string, weight int64) int64

RebuildWeight 根据积压的任务,动态的调整 最终权重

func (*Service) Start

func (s *Service) Start()

Jump to

Keyboard shortcuts

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