// Send command to a task. Overwrites existing commands.
Send command to a task. Overwrites existing commands.
// Send command to a task . Overwrites existing commands .
func (c *cmdr) Send(taskID string, m *statemachine.Message) error {
	buf, err := json.Marshal(m)
	if err != nil {
		return err
	}
	cmdPath := path.Join(c.taskspath, taskID, CommandsPath)
	_, err = c.kvc.Put(context.Background(), cmdPath, string(buf))
	return err
}
func ( c * cmdr ) Send ( taskID string , m * statemachine . Message ) error { buf , err := json . Marshal ( m ) if err != nil { return err } cmdPath := path . Join ( c . taskspath , taskID , CommandsPath ) _ , err = c . kvc . Put ( context . Background ( ) , cmdPath , string ( buf ) ) return err }
Send command to a task.
Send command to a task .