prow/jenkins/controller.go
func NewController(prowJobClient prowv1.ProwJobInterface, jc *Client, ghc *github.Client, logger *logrus.Entry, cfg config.Getter, totURL, selector string) (*Controller, error) {
	n, err := snowflake.NewNode(1)
	if err != nil {
		return nil, err
	}
	if logger == nil {
		logger = logrus.NewEntry(logrus.StandardLogger())
	}
	return &Controller{
		prowJobClient: prowJobClient,
		jc:            jc,
		ghc:           ghc,
		log:           logger,
		cfg:           cfg,
		selector:      selector,
		node:          n,
		totURL:        totURL,
		pendingJobs:   make(map[string]int),
	}, nil
}
func NewController(prowJobClient prowv1.ProwJobInterface, jc *Client, ghc *github.Client, logger *logrus.Entry, cfg config.Getter, totURL, selector string) (*Controller, error) {
	n, err := snowflake.NewNode(1)
	if err != nil {
		return nil, err
	}
	if logger == nil {
		logger = logrus.NewEntry(logrus.StandardLogger())
	}
	return &Controller{
		prowJobClient: prowJobClient,
		jc:            jc,
		ghc:           ghc,
		log:           logger,
		cfg:           cfg,
		selector:      selector,
		node:          n,
		totURL:        totURL,
		pendingJobs:   make(map[string]int),
	}, nil
}
// NewController creates a new Controller from the provided clients.