You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
980 B
40 lines
980 B
/* |
|
------------------------------------------------------------------------------------------------------------------------ |
|
####### sdk ####### Copyright (c) 2021-2022 losyme ################################################# MIT License ####### |
|
------------------------------------------------------------------------------------------------------------------------ |
|
*/ |
|
|
|
package workers |
|
|
|
type Workers struct { |
|
state *state |
|
supervisor *supervisor |
|
} |
|
|
|
func (ws *Workers) Start() { |
|
ws.supervisor.start() |
|
} |
|
|
|
func (ws *Workers) AddOneWorker() { |
|
ws.supervisor.addOneWorker() |
|
} |
|
|
|
func (ws *Workers) StopOneWorker() { |
|
ws.supervisor.stopOneWorker() |
|
} |
|
|
|
func (ws *Workers) StopAllWorkers() { |
|
ws.supervisor.stopAllWorkers() |
|
} |
|
|
|
func (ws *Workers) State() map[string]*Worker { |
|
return ws.state.data() |
|
} |
|
|
|
func (ws *Workers) Stop() { |
|
ws.supervisor.stop() |
|
} |
|
|
|
/* |
|
######################################################################################################## @(°_°)@ ####### |
|
*/
|
|
|