-
-func createClientCertificate() (*tls.Certificate, error) {
- if cert, err := tls.LoadX509KeyPair(configuration.ProducerCertPath, configuration.ProducerKeyPath); err == nil {
- return &cert, nil
- } else {
- return nil, fmt.Errorf("cannot create x509 keypair from cert file %s and key file %s", configuration.ProducerCertPath, configuration.ProducerKeyPath)
- }
-}
-
-func createRetryClient(cert *tls.Certificate) *http.Client {
- rawRetryClient := retryablehttp.NewClient()
- rawRetryClient.RetryWaitMax = time.Minute
- rawRetryClient.RetryMax = int(^uint(0) >> 1)
- rawRetryClient.HTTPClient.Transport = &http.Transport{
- TLSClientConfig: &tls.Config{
- Certificates: []tls.Certificate{
- *cert,
- },
- InsecureSkipVerify: true,
- },
- }
-
- return rawRetryClient.StandardClient()
-}
-
-func registerTypesAndProducer(jobHandler jobs.JobTypeHandler, infoCoordinatorAddress string, callbackAddress string, client restclient.HTTPClient) error {
+func registerTypesAndProducer(jobTypesHandler jobs.JobTypesManager, infoCoordinatorAddress string, callbackAddress string, client restclient.HTTPClient) error {