Semaphore/db/bolt/runner.go
Denis Gukov d1b7ad021e
Runners (#1444)
* feat(runners): add register endpoint

* feat(runners): add remote runner

* refactor(runners): move functionality TaskRunner -> AnsibleJobRunner

* fix(runners): init job

* chore(runners): remote unused field

* feat(runners): use external logger from AnsibleJobRunner

* refactor(runners): remove status field

* refactor(runners): remove mutation from job

* feat(runners): pass username and verison to task

* test(runners): fix tests

* fix(runners): params for Run

* feat(runners): implement runner selection

* feat(runners): fill required fields

* fix(runners): session block

* feat(runners): kill process

* refactor(runners): rename fields to public

* feat(runners): remote runner functionallity

* refactor(runners): remove unused class

* fix(runners): send json

* feat(runners): runner registration

* feat(runners): logging

* feat(runners): server <-> running communication works

* feat(runners): pass creds to runenr
2023-08-29 00:51:04 +02:00

49 lines
1.1 KiB
Go

package bolt
import (
"github.com/ansible-semaphore/semaphore/db"
"github.com/ansible-semaphore/semaphore/util"
)
func (d *BoltDb) GetRunner(projectID int, runnerID int) (runner db.Runner, err error) {
return
}
func (d *BoltDb) GetRunners(projectID int) (runners []db.Runner, err error) {
return
}
func (d *BoltDb) DeleteRunner(projectID int, runnerID int) (err error) {
return
}
func (d *BoltDb) GetGlobalRunner(runnerID int) (runner db.Runner, err error) {
err = d.getObject(0, db.RunnerProps, intObjectID(runnerID), &runner)
return
}
func (d *BoltDb) GetGlobalRunners() (runners []db.Runner, err error) {
err = d.getObjects(0, db.RunnerProps, db.RetrieveQueryParams{}, nil, &runners)
return
}
func (d *BoltDb) DeleteGlobalRunner(runnerID int) (err error) {
return
}
func (d *BoltDb) UpdateRunner(runner db.Runner) (err error) {
return
}
func (d *BoltDb) CreateRunner(runner db.Runner) (newRunner db.Runner, err error) {
runner.Token = util.RandString(12)
res, err := d.createObject(0, db.RunnerProps, runner)
if err != nil {
return
}
newRunner = res.(db.Runner)
return
}