mirror of
https://github.com/datarhei/core.git
synced 2025-10-20 14:45:27 +08:00
Deploy processes with order stop to nodes
This commit is contained in:
@@ -27,7 +27,6 @@ type Proxy interface {
|
||||
|
||||
AddProcess(nodeid string, config *app.Config, metadata map[string]interface{}) error
|
||||
DeleteProcess(nodeid string, id app.ProcessID) error
|
||||
StartProcess(nodeid string, id app.ProcessID) error
|
||||
UpdateProcess(nodeid string, id app.ProcessID, config *app.Config, metadata map[string]interface{}) error
|
||||
CommandProcess(nodeid string, id app.ProcessID, command string) error
|
||||
}
|
||||
@@ -596,23 +595,6 @@ func (p *proxy) DeleteProcess(nodeid string, id app.ProcessID) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *proxy) StartProcess(nodeid string, id app.ProcessID) error {
|
||||
p.lock.RLock()
|
||||
defer p.lock.RUnlock()
|
||||
|
||||
node, ok := p.nodes[nodeid]
|
||||
if !ok {
|
||||
return fmt.Errorf("node not found")
|
||||
}
|
||||
|
||||
err := node.StartProcess(id)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *proxy) UpdateProcess(nodeid string, id app.ProcessID, config *app.Config, metadata map[string]interface{}) error {
|
||||
p.lock.RLock()
|
||||
defer p.lock.RUnlock()
|
||||
|
Reference in New Issue
Block a user