runners

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2016 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AnsiblePool = AnsibleJobPool{

	Register: make(chan *AnsibleJob),
	// contains filtered or unexported fields
}
View Source
var SystemPool = SystemJobPool{

	Register: make(chan *SystemJob),
	// contains filtered or unexported fields
}

Functions

func CanCancel added in v0.0.3

func CanCancel(id bson.ObjectId) bool

func CancelJob added in v0.0.3

func CancelJob(id bson.ObjectId) bool

Types

type AnsibleJob

type AnsibleJob struct {
	Job           models.Job
	Template      models.JobTemplate
	MachineCred   models.Credential
	NetworkCred   models.Credential
	CloudCred     models.Credential
	Inventory     models.Inventory
	Project       models.Project
	User          models.User
	Token         string
	SigKill       chan bool
	UpdateSigKill chan bool
}

type AnsibleJobPool

type AnsibleJobPool struct {
	Register chan *AnsibleJob
	// contains filtered or unexported fields
}

func (*AnsibleJobPool) CanCancel added in v0.0.3

func (p *AnsibleJobPool) CanCancel(id bson.ObjectId) bool

func (*AnsibleJobPool) DetachFromRunning added in v0.0.9

func (p *AnsibleJobPool) DetachFromRunning(id bson.ObjectId) bool

func (*AnsibleJobPool) KillJob added in v0.0.9

func (p *AnsibleJobPool) KillJob(id bson.ObjectId) bool

KillJob will loop through Ansible job queue and Running job queue and kills the job

func (*AnsibleJobPool) Run added in v0.0.9

func (p *AnsibleJobPool) Run()

type SystemJob added in v0.0.2

type SystemJob struct {
	Job            models.SystemJob
	Project        models.Project
	Credential     models.Credential
	CredentialPath string
	SigKill        chan bool
}

SystemJob inlcudes current information about current job, project, scm credential, credential path and achannel to send a kill signal to running job if true passed to SigKill the job will be terminated

func UpdateProject added in v0.0.3

func UpdateProject(p models.Project) (*SystemJob, error)

UpdateProject will create and start a update system job using ansible playbook project_update.yml

type SystemJobPool added in v0.0.2

type SystemJobPool struct {
	Register chan *SystemJob
	// contains filtered or unexported fields
}

func (*SystemJobPool) DetachFromRunning added in v0.0.9

func (p *SystemJobPool) DetachFromRunning(id bson.ObjectId) bool

func (*SystemJobPool) Run added in v0.0.9

func (p *SystemJobPool) Run()

Run

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL