func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, error) {
	configShallowCopy := *c
	if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 {
		if configShallowCopy.Burst <= 0 {
			return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0")
		}
		configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst)
	}
	var cs Clientset
	var err error
	cs.crV1, err = crv1.NewForConfigAndClient(&configShallowCopy, httpClient)
	if err != nil {
		return nil, err
	}
	cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfigAndClient(&configShallowCopy, httpClient)
	if err != nil {
		return nil, err
	}
	return &cs, nil
}
NewForConfigAndClient creates a new Clientset for the given config and http client.
Note the http client provided takes precedence over the configured transport values.
If config's RateLimiter is not set and QPS and Burst are acceptable,
NewForConfigAndClient will generate a rate-limiter in configShallowCopy.
package versioned
import (
	"fmt"
	"net/http"
	crv1 "k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1"
	discovery "k8s.io/client-go/discovery"
	rest "k8s.io/client-go/rest"
	flowcontrol "k8s.io/client-go/util/flowcontrol"
)
type Interface interface {
	Discovery() discovery.DiscoveryInterface
	CrV1() crv1.CrV1Interface
}
type Clientset struct {
	*discovery.DiscoveryClient
	crV1 *crv1.CrV1Client
}
func (c *Clientset) CrV1() crv1.CrV1Interface {
	return c.crV1
}
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
	if c == nil {
		return nil
	}
	return c.DiscoveryClient
}
func NewForConfig(c *rest.Config) (*Clientset, error) {
	configShallowCopy := *c
	httpClient, err := rest.HTTPClientFor(&configShallowCopy)
	if err != nil {
		return nil, err
	}
	return NewForConfigAndClient(&configShallowCopy, httpClient)
}