func (n *NuclioResourceScaler) SetHTTPClient(httpClient *http.Client) {
	n.httpClient = httpClient
}
SetHTTPClient sets the http client for testing purposes
package resourcescaler
import (
	"crypto/tls"
	"fmt"
	"net/http"
	"time"
	"github.com/nuclio/nuclio/pkg/common"
	"github.com/nuclio/nuclio/pkg/functionconfig"
	"github.com/nuclio/nuclio/pkg/platform/kube"
	nuclioio "github.com/nuclio/nuclio/pkg/platform/kube/apis/nuclio.io/v1beta1"
	nuclioioclient "github.com/nuclio/nuclio/pkg/platform/kube/client/clientset/versioned"
	"github.com/nuclio/nuclio/pkg/platformconfig"
	httptrigger "github.com/nuclio/nuclio/pkg/processor/trigger/http"
	"github.com/nuclio/errors"
	"github.com/nuclio/logger"
	"github.com/v3io/scaler/pkg/scalertypes"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/runtime/schema"
)
type NuclioResourceScaler struct {
	logger                               logger.Logger
	nuclioClientSet                      nuclioioclient.Interface
	namespace                            string
	platformConfiguration                *platformconfig.Config
	httpClient                           *http.Client
	functionReadinessVerificationEnabled bool
}
func New(logger logger.Logger,
	namespace string,
	nuclioClientSet nuclioioclient.Interface,
	platformConfiguration *platformconfig.Config) (scalertypes.ResourceScaler, error) {
	logger.DebugWith("Initializing resource scaler",
		"platformconfig", platformConfiguration)
	return &NuclioResourceScaler{
		logger:                logger,
		namespace:             namespace,
		nuclioClientSet:       nuclioClientSet,
		platformConfiguration: platformConfiguration,
		httpClient: &http.Client{
			Timeout: 30 * time.Second,
			Transport: &http.Transport{
				TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
			},
		},
	}, nil
}
func (n *NuclioResourceScaler) SetScale(resources []scalertypes.Resource, scale int) error {
	if scale == 0 {
		return n.scaleFunctionsToZero(resources)
	}
	return n.scaleFunctionsFromZero(resources)
}