mirror of
https://github.com/samuelncui/yatm.git
synced 2025-12-23 06:15:22 +00:00
16 lines
322 B
Go
16 lines
322 B
Go
package apis
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/samuelncui/yatm/entity"
|
|
)
|
|
|
|
func (api *API) JobDispatch(ctx context.Context, req *entity.JobDispatchRequest) (*entity.JobDispatchReply, error) {
|
|
if err := api.exe.Dispatch(ctx, req.Id, req.Param); err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return &entity.JobDispatchReply{}, nil
|
|
}
|