func (rc *ReferenceConfig) GetRPCService() common.RPCService {
	return rc.pxy.Get()
}
GetRPCService gets RPCService from proxy
package config
import (
	"fmt"
	"net/url"
	"strconv"
	"time"
)
import (
	"github.com/creasty/defaults"
	gxstrings "github.com/dubbogo/gost/strings"
)
import (
	"dubbo.apache.org/dubbo-go/v3/cluster/directory"
	"dubbo.apache.org/dubbo-go/v3/common"
	"dubbo.apache.org/dubbo-go/v3/common/constant"
	"dubbo.apache.org/dubbo-go/v3/common/extension"
	"dubbo.apache.org/dubbo-go/v3/common/proxy"
	"dubbo.apache.org/dubbo-go/v3/config/generic"
	"dubbo.apache.org/dubbo-go/v3/protocol"
	"dubbo.apache.org/dubbo-go/v3/protocol/protocolwrapper"
)
type ReferenceConfig struct {
	pxy            *proxy.Proxy
	id             string
	InterfaceName  string            `required:"true"  yaml:"interface"  json:"interface,omitempty" property:"interface"`
	Check          *bool             `default:"false" yaml:"check"  json:"check,omitempty" property:"check"`
	URL            string            `yaml:"url"  json:"url,omitempty" property:"url"`
	Filter         string            `yaml:"filter" json:"filter,omitempty" property:"filter"`
	Protocol       string            `default:"dubbo"  yaml:"protocol"  json:"protocol,omitempty" property:"protocol"`
	Registry       []string          `yaml:"registry"  json:"registry,omitempty"  property:"registry"`
	Cluster        string            `yaml:"cluster"  json:"cluster,omitempty" property:"cluster"`
	Loadbalance    string            `yaml:"loadbalance"  json:"loadbalance,omitempty" property:"loadbalance"`
	Retries        string            `yaml:"retries"  json:"retries,omitempty" property:"retries"`
	Group          string            `yaml:"group"  json:"group,omitempty" property:"group"`
	Version        string            `yaml:"version"  json:"version,omitempty" property:"version"`
	Serialization  string            `yaml:"serialization" json:"serialization" property:"serialization"`
	ProvidedBy     string            `yaml:"provided_by"  json:"provided_by,omitempty" property:"provided_by"`
	Methods        []*MethodConfig   `yaml:"methods"  json:"methods,omitempty" property:"methods"`
	Async          bool              `yaml:"async"  json:"async,omitempty" property:"async"`
	Params         map[string]string `yaml:"params"  json:"params,omitempty" property:"params"`
	invoker        protocol.Invoker
	urls           []*common.URL
	Generic        string `yaml:"generic"  json:"generic,omitempty" property:"generic"`
	Sticky         bool   `yaml:"sticky"   json:"sticky,omitempty" property:"sticky"`
	RequestTimeout string `yaml:"timeout"  json:"timeout,omitempty" property:"timeout"`
	ForceTag       bool   `yaml:"force.tag"  json:"force.tag,omitempty" property:"force.tag"`
	rootConfig   *RootConfig
	metaDataType string
}
func (rc *ReferenceConfig) Prefix() string {
	return constant.ReferenceConfigPrefix + rc.InterfaceName + "."
}
func (rc *ReferenceConfig) Init(root *RootConfig) error {
	for _, method := range rc.Methods {
		if err := method.Init(); err != nil {
			return err
		}
	}
	if err := defaults.Set(rc); err != nil {
		return err
	}
	rc.rootConfig = root
	if root.Application != nil {
		rc.metaDataType = root.Application.MetadataType
	}
	rc.Registry = translateRegistryIds(rc.Registry)
	if len(rc.Registry) <= 0 {
		rc.Registry = root.Consumer.Registry
	}
	return verify(rc)
}
func (rc *ReferenceConfig) Refer(srv interface{}) {
	cfgURL := common.NewURLWithOptions(
		common.WithPath(rc.InterfaceName),
		common.WithProtocol(rc.Protocol),
		common.WithParams(rc.getURLMap()),
		common.WithParamsValue(constant.BEAN_NAME_KEY, rc.id),
		common.WithParamsValue(constant.METADATATYPE_KEY, rc.metaDataType),
	)
	SetConsumerServiceByInterfaceName(rc.InterfaceName, srv)
	if rc.ForceTag {
		cfgURL.AddParam(constant.ForceUseTag, "true")
	}
	rc.postProcessConfig(cfgURL)
	if rc.URL != "" {
		urlStrings := gxstrings.RegSplit(rc.URL, "\\s*[;]+\\s*")
		for _, urlStr := range urlStrings {
			serviceURL, err := common.NewURL(urlStr)
			if err != nil {
				panic(fmt.Sprintf("url configuration error,  please check your configuration, user specified URL %v refer error, error message is %v ", urlStr, err.Error()))
			}
			if serviceURL.Protocol == constant.REGISTRY_PROTOCOL {
				serviceURL.SubURL = cfgURL
				rc.urls = append(rc.urls, serviceURL)
			} else {
				if serviceURL.Path == "" {
					serviceURL.Path = "/" + rc.InterfaceName
				}
				newURL := common.MergeURL(serviceURL, cfgURL)
				rc.urls = append(rc.urls, newURL)
			}
		}
	} else {
		rc.urls = loadRegistries(rc.Registry, rc.rootConfig.Registries, common.CONSUMER)
		for _, regURL := range rc.urls {
			regURL.SubURL = cfgURL
		}
	}
	if len(rc.urls) == 1 {
		if rc.urls[0].Protocol == constant.SERVICE_REGISTRY_PROTOCOL {
			rc.invoker = extension.GetProtocol("registry").Refer(rc.urls[0])
		} else {
			rc.invoker = extension.GetProtocol(rc.urls[0].Protocol).Refer(rc.urls[0])
		}
		if rc.URL != "" {
			rc.invoker = protocolwrapper.BuildInvokerChain(rc.invoker, constant.REFERENCE_FILTER_KEY)
			invokers := make([]protocol.Invoker, 0, len(rc.urls))
			invokers = append(invokers, rc.invoker)
			var hitClu string
			hitClu = constant.FAILOVER_CLUSTER_NAME
			if len(invokers) > 0 {
				u := invokers[0].GetURL()
				if nil != &u {
					hitClu = u.GetParam(constant.CLUSTER_KEY, constant.ZONEAWARE_CLUSTER_NAME)
				}
			}
			cluster := extension.GetCluster(hitClu)
			rc.invoker = cluster.Join(directory.NewStaticDirectory(invokers))
		}
	} else {
		invokers := make([]protocol.Invoker, 0, len(rc.urls))
		var regURL *common.URL
		for _, u := range rc.urls {
			var invoker protocol.Invoker
			if u.Protocol == constant.SERVICE_REGISTRY_PROTOCOL {
				invoker = extension.GetProtocol("registry").Refer(u)
			} else {
				invoker = extension.GetProtocol(u.Protocol).Refer(u)
			}
			if rc.URL != "" {
				invoker = protocolwrapper.BuildInvokerChain(invoker, constant.REFERENCE_FILTER_KEY)
			}
			invokers = append(invokers, invoker)
			if u.Protocol == constant.REGISTRY_PROTOCOL {
				regURL = u
			}
		}
		var hitClu string
		if regURL != nil {
			hitClu = constant.ZONEAWARE_CLUSTER_NAME
		} else {
			hitClu = constant.FAILOVER_CLUSTER_NAME
			if len(invokers) > 0 {
				u := invokers[0].GetURL()
				if nil != &u {
					hitClu = u.GetParam(constant.CLUSTER_KEY, constant.ZONEAWARE_CLUSTER_NAME)
				}
			}
		}
		cluster := extension.GetCluster(hitClu)
		rc.invoker = cluster.Join(directory.NewStaticDirectory(invokers))
	}
	publishServiceDefinition(cfgURL)
	if rc.Async {
		callback := GetCallback(rc.id)
		rc.pxy = extension.GetProxyFactory(rc.rootConfig.Consumer.ProxyFactory).GetAsyncProxy(rc.invoker, callback, cfgURL)
	} else {
		rc.pxy = extension.GetProxyFactory(rc.rootConfig.Consumer.ProxyFactory).GetProxy(rc.invoker, cfgURL)
	}
}
func (rc *ReferenceConfig) Implement(v common.RPCService) {
	rc.pxy.Implement(v)
}