Hide details of delegated agents for PR and LB, to disable docker for LB (#872)

* Move delegated agent creation within NewLBAgent so we can hide the fact we disable docker
* Move delegated agent creation within NewPureRunner for better encapsulation
This commit is contained in:
Dario Domizioli
2018-03-20 13:45:45 +00:00
committed by GitHub
parent 38eebf69cd
commit 27ffb561e8
5 changed files with 23 additions and 20 deletions

View File

@@ -102,7 +102,8 @@ type lbAgent struct {
shutdown chan struct{}
}
func NewLBAgent(agent Agent, rp pool.RunnerPool, p pool.Placer) (Agent, error) {
func NewLBAgent(da DataAccess, rp pool.RunnerPool, p pool.Placer) (Agent, error) {
agent := createAgent(da, false)
a := &lbAgent{
delegatedAgent: agent,
rp: rp,