func preV1Beta3(version string) bool {
	return version == "v1beta1" || version == "v1beta2"
}
preV1Beta3 returns true if the provided API version is an API introduced before v1beta3.
package client
import (
	"encoding/json"
	"fmt"
	"net"
	"net/url"
	"strings"
	"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
	"github.com/GoogleCloudPlatform/kubernetes/pkg/version"
)
type Interface interface {
	PodsNamespacer
	ReplicationControllersNamespacer
	ServicesNamespacer
	EndpointsNamespacer
	VersionInterface
	NodesInterface
	EventNamespacer
	LimitRangesNamespacer
	ResourceQuotasNamespacer
	ResourceQuotaUsagesNamespacer
	SecretsNamespacer
	NamespacesInterface
}
func (c *Client) ReplicationControllers(namespace string) ReplicationControllerInterface {
	return newReplicationControllers(c, namespace)
}
func (c *Client) Nodes() NodeInterface {
	return newNodes(c)
}
func (c *Client) Events(namespace string) EventInterface {
	return newEvents(c, namespace)
}
func (c *Client) Endpoints(namespace string) EndpointsInterface {
	return newEndpoints(c, namespace)
}
func (c *Client) Pods(namespace string) PodInterface {
	return newPods(c, namespace)
}
func (c *Client) Services(namespace string) ServiceInterface {
	return newServices(c, namespace)
}
func (c *Client) LimitRanges(namespace string) LimitRangeInterface {
	return newLimitRanges(c, namespace)
}
func (c *Client) ResourceQuotas(namespace string) ResourceQuotaInterface {
	return newResourceQuotas(c, namespace)
}
func (c *Client) ResourceQuotaUsages(namespace string) ResourceQuotaUsageInterface {
	return newResourceQuotaUsages(c, namespace)
}
func (c *Client) Secrets(namespace string) SecretsInterface {
	return newSecrets(c, namespace)
}
func (c *Client) Namespaces() NamespaceInterface {
	return newNamespaces(c)
}
type VersionInterface interface {
	ServerVersion() (*version.Info, error)
	ServerAPIVersions() (*api.APIVersions, error)
}
type APIStatus interface {
	Status() api.Status
}
type Client struct {
	*RESTClient
}
func (c *Client) ServerVersion() (*version.Info, error) {
	body, err := c.Get().AbsPath("/version").Do().Raw()
	if err != nil {
		return nil, err
	}
	var info version.Info
	err = json.Unmarshal(body, &info)
	if err != nil {
		return nil, fmt.Errorf("got '%s': %v", string(body), err)
	}
	return &info, nil
}
func (c *Client) ServerAPIVersions() (*api.APIVersions, error) {
	body, err := c.Get().AbsPath("/api").Do().Raw()
	if err != nil {
		return nil, err
	}
	var v api.APIVersions
	err = json.Unmarshal(body, &v)
	if err != nil {
		return nil, fmt.Errorf("got '%s': %v", string(body), err)
	}
	return &v, nil
}
func IsTimeout(err error) bool {
	if err == nil {
		return false
	}
	switch err := err.(type) {
	case *url.Error:
		if err, ok := err.Err.(net.Error); ok {
			return err.Timeout()
		}
	case net.Error:
		return err.Timeout()
	}
	if strings.Contains(err.Error(), "use of closed network connection") {
		return true
	}
	return false
}