summaryrefslogtreecommitdiff
path: root/plugins/jobs/rpc.go
blob: e77cda59099d06720e5849fefaf74bc2f7f4080e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package jobs

import (
	"github.com/spiral/roadrunner/v2/plugins/jobs/structs"
	"github.com/spiral/roadrunner/v2/plugins/logger"
)

type rpc struct {
	log logger.Logger
	p   *Plugin
}

func (r *rpc) Push(j *structs.Job, idRet *string) error {
	id, err := r.p.Push(j)
	if err != nil {
		panic(err)
	}
	*idRet = id
	return nil
}