func (qc *QingCloud) LoadBalancer() (cloudprovider.LoadBalancer, bool) {
	return qc, true
}
LoadBalancer returns an implementation of LoadBalancer for QingCloud.
package qingcloud
import (
	"context"
	"fmt"
	"github.com/davecgh/go-spew/spew"
	"github.com/yunify/qingcloud-cloud-controller-manager/pkg/apis"
	"github.com/yunify/qingcloud-cloud-controller-manager/pkg/errors"
	"github.com/yunify/qingcloud-cloud-controller-manager/pkg/executor"
	yaml "gopkg.in/yaml.v2"
	"io"
	v1 "k8s.io/api/core/v1"
	"k8s.io/client-go/informers"
	corev1informer "k8s.io/client-go/informers/core/v1"
	corev1 "k8s.io/client-go/kubernetes/typed/core/v1"
	cloudprovider "k8s.io/cloud-provider"
	"k8s.io/klog"
)
const (
	ProviderName = "qingcloud"
	QYConfigPath = "/etc/qingcloud/config.yaml"
)
type Config struct {
	Zone              string   `yaml:"zone"`
	DefaultVxNetForLB string   `yaml:"defaultVxNetForLB,omitempty"`
	ClusterID         string   `yaml:"clusterID"`
	IsApp             bool     `yaml:"isApp,omitempty"`
	TagIDs            []string `yaml:"tagIDs,omitempty"`
	InstanceIDs       []string `yaml:"instanceIDs,omitempty"`
}
type QingCloud struct {
	Config *Config
	Client executor.QingCloudClientInterface
	nodeInformer    corev1informer.NodeInformer
	serviceInformer corev1informer.ServiceInformer
	corev1interface corev1.CoreV1Interface
}
func init() {
	cloudprovider.RegisterCloudProvider(ProviderName, func(config io.Reader) (cloudprovider.Interface, error) {
		return NewQingCloud(config)
	})
}
func NewQingCloud(cfg io.Reader) (cloudprovider.Interface, error) {
	if cfg == nil {
		return nil, fmt.Errorf("no qingcloud provider Config file given")
	}
	var (
		config Config
	)
	err := yaml.NewDecoder(cfg).Decode(&config)
	if err != nil {
		return nil, fmt.Errorf("failed to decode Config file, err=%v", err)
	}
	client, err := executor.NewQingCloudClient(&executor.ClientConfig{
		IsAPP:  config.IsApp,
		TagIDs: config.TagIDs,
	}, QYConfigPath)
	if err != nil {
		return nil, err
	}
	qc := QingCloud{
		Config: &config,
		Client: client,
	}
	return &qc, nil
}
func (qc *QingCloud) Initialize(clientBuilder cloudprovider.ControllerClientBuilder, stop <-chan struct{}) {
	clientset := clientBuilder.ClientOrDie("do-shared-informers")
	sharedInformer := informers.NewSharedInformerFactory(clientset, 0)
	nodeinformer := sharedInformer.Core().V1().Nodes()
	go nodeinformer.Informer().Run(stop)
	qc.nodeInformer = nodeinformer
	serviceInformer := sharedInformer.Core().V1().Services()
	go serviceInformer.Informer().Run(stop)
	qc.serviceInformer = serviceInformer
	qc.corev1interface = clientset.CoreV1()
}
func (qc *QingCloud) Clusters() (cloudprovider.Clusters, bool) {
	return nil, false
}
func (qc *QingCloud) Routes() (cloudprovider.Routes, bool) {
	return nil, false
}
func (qc *QingCloud) ProviderName() string {
	return ProviderName
}
func (qc *QingCloud) Instances() (cloudprovider.Instances, bool) {
	return nil, false
}
func (qc *QingCloud) InstancesV2() (cloudprovider.InstancesV2, bool) {
	return nil, false
}
func (qc *QingCloud) Zones() (cloudprovider.Zones, bool) {
	return nil, false
}
func (qc *QingCloud) HasClusterID() bool {
	return qc.Config.ClusterID != ""
}