Documentation
¶
Index ¶
- type Config
- type Service
- func (s *Service) AddTask(task *_wp.Task) error
- func (s *Service) GetWPConfig() *_wp.Config
- func (s *Service) Run() (err error)
- func (s *Service) RunTasksGroupCh(externalId uint64, tasks []*_wp.Task, taskGroupName string) (err error)
- func (s *Service) RunTasksGroupWG(externalId uint64, tasks []*_wp.Task, taskGroupName string) (err error)
- func (s *Service) Shutdown(hardShutdown bool, shutdownTimeout time.Duration) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
TotalTimeout time.Duration `yaml:"total_timeout" json:"total_timeout"` // максимальное время обработки
ShutdownTimeout time.Duration `yaml:"shutdown_timeout" json:"shutdown_timeout"` // максимальное время жестокой остановки worker
WPCfg _wp.Config `yaml:"worker_pool" json:"worker_pool"` // конфигурационные параметры
}
Config конфигурационные настройки
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service represent WorkerPool service
func (*Service) GetWPConfig ¶
GetWPConfig конфигурация workerpool
func (*Service) RunTasksGroupCh ¶
func (s *Service) RunTasksGroupCh(externalId uint64, tasks []*_wp.Task, taskGroupName string) (err error)
RunTasksGroupCh - запустить группу задач в отдельной chanel с возможностью остановки
Click to show internal directories.
Click to hide internal directories.