Versions in this module Expand all Collapse all v1 v1.0.8 Mar 16, 2021 Changes in this version + const Default_Beat_Thread_Num + const Default_Update_Thread_Num + var GZIP_MAGIC = []byte("\x1F\x8B") + func IsGzipFile(data []byte) bool + func TryDecompressData(data []byte) string + type BeatReactor struct + func NewBeatReactor(serviceProxy NamingProxy, clientBeatInterval int64) BeatReactor + func (br *BeatReactor) AddBeatInfo(serviceName string, beatInfo model.BeatInfo) + func (br *BeatReactor) RemoveBeatInfo(serviceName string, ip string, port uint64) + type Chooser struct + type HostReactor struct + func NewHostReactor(serviceProxy NamingProxy, cacheDir string, updateThreadNum int, ...) HostReactor + func (hr *HostReactor) GetAllServiceInfo(nameSpace, groupName string, pageNo, pageSize uint32) model.ServiceList + func (hr *HostReactor) GetServiceInfo(serviceName string, clusters string) (model.Service, error) + func (hr *HostReactor) ProcessServiceJson(result string) + type INamingClient interface + DeregisterInstance func(param vo.DeregisterInstanceParam) (bool, error) + GetAllServicesInfo func(param vo.GetAllServiceInfoParam) (model.ServiceList, error) + GetService func(param vo.GetServiceParam) (model.Service, error) + RegisterInstance func(param vo.RegisterInstanceParam) (bool, error) + SelectAllInstances func(param vo.SelectAllInstancesParam) ([]model.Instance, error) + SelectInstances func(param vo.SelectInstancesParam) ([]model.Instance, error) + SelectOneHealthyInstance func(param vo.SelectOneHealthInstanceParam) (*model.Instance, error) + Subscribe func(param *vo.SubscribeParam) error + Unsubscribe func(param *vo.SubscribeParam) error + type NamingClient struct + NamespaceId string + func NewNamingClient(nc nacos_client.INacosClient) (NamingClient, error) + func (sc *NamingClient) DeregisterInstance(param vo.DeregisterInstanceParam) (bool, error) + func (sc *NamingClient) GetAllServicesInfo(param vo.GetAllServiceInfoParam) (model.ServiceList, error) + func (sc *NamingClient) GetService(param vo.GetServiceParam) (model.Service, error) + func (sc *NamingClient) RegisterInstance(param vo.RegisterInstanceParam) (bool, error) + func (sc *NamingClient) SelectAllInstances(param vo.SelectAllInstancesParam) ([]model.Instance, error) + func (sc *NamingClient) SelectInstances(param vo.SelectInstancesParam) ([]model.Instance, error) + func (sc *NamingClient) SelectOneHealthyInstance(param vo.SelectOneHealthInstanceParam) (*model.Instance, error) + func (sc *NamingClient) Subscribe(param *vo.SubscribeParam) error + func (sc *NamingClient) Unsubscribe(param *vo.SubscribeParam) error + type NamingProxy struct + func NewNamingProxy(clientCfg constant.ClientConfig, serverCfgs []constant.ServerConfig, ...) (NamingProxy, error) + func (proxy *NamingProxy) DeregisterInstance(serviceName string, ip string, port uint64, clusterName string, ephemeral bool) (string, error) + func (proxy *NamingProxy) GetAllServiceInfoList(namespace, groupName string, pageNo, pageSize uint32) (string, error) + func (proxy *NamingProxy) GetServiceList(pageNo int, pageSize int, groupName string, selector *model.ExpressionSelector) (*model.ServiceList, error) + func (proxy *NamingProxy) QueryList(serviceName string, clusters string, udpPort int, healthyOnly bool) (string, error) + func (proxy *NamingProxy) RegisterInstance(serviceName string, groupName string, instance model.Instance) (string, error) + func (proxy *NamingProxy) SendBeat(info model.BeatInfo) (int64, error) + func (proxy *NamingProxy) ServerHealthy() bool + type PushData struct + Data string + LastRefTime int64 + PushType string + type PushReceiver struct + func NewPushReceiver(hostReactor *HostReactor) *PushReceiver + type SubscribeCallback struct + func NewSubscribeCallback() SubscribeCallback + func (ed *SubscribeCallback) AddCallbackFuncs(serviceName string, clusters string, ...) + func (ed *SubscribeCallback) RemoveCallbackFuncs(serviceName string, clusters string, ...) + func (ed *SubscribeCallback) ServiceChanged(service *model.Service)