Semaphore/db/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

16 lines
343 B
Go

package db
type RunnerState string
const (
RunnerOffline RunnerState = "offline"
RunnerActive RunnerState = "active"
)
type Runner struct {
ID int `db:"id" json:"-"`
Token string `db:"token" json:"-"`
ProjectID *int `db:"project_id" json:"project_id"`
State RunnerState `db:"state" json:"state"`
}