github.com/ssube/gitlab-ci-multi-runner@v1.2.1-0.20160607142738-b8d1285632e6/executors/default_executor_provider.go (about) 1 package executors 2 3 import "gitlab.com/gitlab-org/gitlab-ci-multi-runner/common" 4 5 type DefaultExecutorProvider struct { 6 Creator func() common.Executor 7 FeaturesUpdater func(features *common.FeaturesInfo) 8 } 9 10 func (e DefaultExecutorProvider) CanCreate() bool { 11 return e.Creator != nil 12 } 13 14 func (e DefaultExecutorProvider) Create() common.Executor { 15 if e.Creator == nil { 16 return nil 17 } 18 return e.Creator() 19 } 20 21 func (e DefaultExecutorProvider) Acquire(config *common.RunnerConfig) (common.ExecutorData, error) { 22 return nil, nil 23 } 24 25 func (e DefaultExecutorProvider) Release(config *common.RunnerConfig, data common.ExecutorData) error { 26 return nil 27 } 28 29 func (e DefaultExecutorProvider) GetFeatures(features *common.FeaturesInfo) { 30 if e.FeaturesUpdater != nil { 31 e.FeaturesUpdater(features) 32 } 33 }