prow/plank/controller.go
func NewController(kc *kube.Client, pkcs map[string]*kube.Client, ghc GitHubClient, logger *logrus.Entry, cfg config.Getter, totURL, selector string, skipReport bool) (*Controller, error) {
	if logger == nil {
		logger = logrus.NewEntry(logrus.StandardLogger())
	}
	buildClusters := map[string]kubeClient{}
	for alias, client := range pkcs {
		buildClusters[alias] = kubeClient(client)
	}
	return &Controller{
		kc:          kc,
		pkcs:        buildClusters,
		ghc:         ghc,
		log:         logger,
		config:      cfg,
		pendingJobs: make(map[string]int),
		totURL:      totURL,
		selector:    selector,
		skipReport:  skipReport,
	}, nil
}
func NewController(kc *kube.Client, pkcs map[string]*kube.Client, ghc GitHubClient, logger *logrus.Entry, cfg config.Getter, totURL, selector string, skipReport bool) (*Controller, error) {
	if logger == nil {
		logger = logrus.NewEntry(logrus.StandardLogger())
	}
	buildClusters := map[string]kubeClient{}
	for alias, client := range pkcs {
		buildClusters[alias] = kubeClient(client)
	}
	return &Controller{
		kc:          kc,
		pkcs:        buildClusters,
		ghc:         ghc,
		log:         logger,
		config:      cfg,
		pendingJobs: make(map[string]int),
		totURL:      totURL,
		selector:    selector,
		skipReport:  skipReport,
	}, nil
}
func NewController ( kc * kube . Client , pkcs map [ string ] * kube . Client , ghc GitHubClient , logger * logrus . Entry , cfg config . Getter , totURL , selector string , skipReport bool ) ( * Controller , error ) { if logger == nil { logger = logrus . NewEntry ( logrus . StandardLogger ( ) ) } buildClusters := map [ string ] kubeClient { } for alias , client := range pkcs { buildClusters [ alias ] = kubeClient ( client ) } return & Controller { kc : kc , pkcs : buildClusters , ghc : ghc , log : logger , config : cfg , pendingJobs : make ( map [ string ] int ) , totURL : totURL , selector : selector , skipReport : skipReport , } , nil }
// NewController creates a new Controller from the provided clients.
NewController creates a new Controller from the provided clients .