Documentation
¶
Index ¶
- func Readln(r *bufio.Reader) (string, error)
- type Alert
- type Job
- type LocalJob
- type RemoteJob
- type TaskPool
- func (p *TaskPool) AddTask(taskObj db.Task, userID *int, projectID int) (newTask db.Task, err error)
- func (p *TaskPool) GetNumberOfRunningTasksOfRunner(runnerID int) (res int)
- func (p *TaskPool) GetRunningTasks() (res []*TaskRunner)
- func (p *TaskPool) GetTask(id int) (task *TaskRunner)
- func (p *TaskPool) Run()
- func (p *TaskPool) StopTask(targetTask db.Task, forceStop bool) error
- type TaskRunner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Alert ¶
type Alert struct {
TaskID string
Name string
TaskURL string
ChatID string
TaskResult string
TaskDescription string
TaskVersion string
Author string
Color string
From string
}
Alert represents an alert that will be templated and sent to the appropriate service
type LocalJob ¶
type LocalJob struct {
// Received constant fields
Task db.Task
Template db.Template
Inventory db.Inventory
Repository db.Repository
Environment db.Environment
Playbook *db_lib.AnsiblePlaybook
Logger lib.Logger
// Internal field
Process *os.Process
// contains filtered or unexported fields
}
func (*LocalJob) SetStatus ¶
func (t *LocalJob) SetStatus(status lib.TaskStatus)
type RemoteJob ¶
type RemoteJob struct {
Task db.Task
Template db.Template
Inventory db.Inventory
Repository db.Repository
Environment db.Environment
Playbook *db_lib.AnsiblePlaybook
Logger lib.Logger
// contains filtered or unexported fields
}
type TaskPool ¶
type TaskPool struct {
// contains filtered or unexported fields
}
func CreateTaskPool ¶
func (*TaskPool) GetNumberOfRunningTasksOfRunner ¶
func (*TaskPool) GetRunningTasks ¶
func (p *TaskPool) GetRunningTasks() (res []*TaskRunner)
func (*TaskPool) GetTask ¶
func (p *TaskPool) GetTask(id int) (task *TaskRunner)
type TaskRunner ¶
type TaskRunner struct {
Task db.Task
Template db.Template
Inventory db.Inventory
Repository db.Repository
Environment db.Environment
RunnerID int
Username string
IncomingVersion *string
// contains filtered or unexported fields
}
func (*TaskRunner) Log ¶
func (t *TaskRunner) Log(msg string)
func (*TaskRunner) LogCmd ¶
func (t *TaskRunner) LogCmd(cmd *exec.Cmd)
func (*TaskRunner) SetStatus ¶
func (t *TaskRunner) SetStatus(status lib.TaskStatus)
Click to show internal directories.
Click to hide internal directories.