Versions in this module Expand all Collapse all v1 v1.0.7 Apr 28, 2022 v1.0.6 Apr 11, 2022 v1.0.5 Mar 31, 2022 v1.0.4 Mar 29, 2022 Changes in this version + const DefaultPageSize + const MaxWaitInterval + const RegistryConnDelay + func ToConfigurators(urls []*common.URL, f func(url *common.URL) config_center.Configurator) []config_center.Configurator + type BaseConfigurationListener struct + func (bcl *BaseConfigurationListener) Configurators() []config_center.Configurator + func (bcl *BaseConfigurationListener) InitWith(key string, listener config_center.ConfigurationListener, ...) + func (bcl *BaseConfigurationListener) OverrideUrl(url *common.URL) + func (bcl *BaseConfigurationListener) Process(event *config_center.ConfigChangeEvent) + type BaseRegistry struct + func (r *BaseRegistry) Destroy() + func (r *BaseRegistry) Done() chan struct{} + func (r *BaseRegistry) GetURL() *common.URL + func (r *BaseRegistry) InitBaseRegistry(url *common.URL, facadeRegistry FacadeBasedRegistry) Registry + func (r *BaseRegistry) IsAvailable() bool + func (r *BaseRegistry) Register(url *common.URL) error + func (r *BaseRegistry) RestartCallBack() bool + func (r *BaseRegistry) Subscribe(url *common.URL, notifyListener NotifyListener) error + func (r *BaseRegistry) UnRegister(url *common.URL) error + func (r *BaseRegistry) UnSubscribe(url *common.URL, notifyListener NotifyListener) error + func (r *BaseRegistry) WaitGroup() *sync.WaitGroup + type DefaultServiceInstance struct + Address string + Enable bool + GroupName string + Healthy bool + Host string + ID string + Metadata map[string]string + Port int + ServiceMetadata *common.MetadataInfo + ServiceName string + func (d *DefaultServiceInstance) Copy(endpoint *Endpoint) ServiceInstance + func (d *DefaultServiceInstance) GetAddress() string + func (d *DefaultServiceInstance) GetEndPoints() []*Endpoint + func (d *DefaultServiceInstance) GetHost() string + func (d *DefaultServiceInstance) GetID() string + func (d *DefaultServiceInstance) GetMetadata() map[string]string + func (d *DefaultServiceInstance) GetPort() int + func (d *DefaultServiceInstance) GetServiceName() string + func (d *DefaultServiceInstance) IsEnable() bool + func (d *DefaultServiceInstance) IsHealthy() bool + func (d *DefaultServiceInstance) SetServiceMetadata(m *common.MetadataInfo) + func (d *DefaultServiceInstance) ToURLs() []*common.URL + type Endpoint struct + Port int + Protocol string + type FacadeBasedRegistry interface + CloseAndNilClient func() + CloseListener func() + CreatePath func(string) error + DoRegister func(string, string) error + DoSubscribe func(conf *common.URL) (Listener, error) + DoUnregister func(string, string) error + DoUnsubscribe func(conf *common.URL) (Listener, error) + InitListeners func() + type KeyFunc func(*common.URL) string + type Listener interface + Close func() + Next func() (*ServiceEvent, error) + type MockRegistry struct + func (*MockRegistry) Register(url *common.URL) error + func (r *MockRegistry) Destroy() + func (r *MockRegistry) GetURL() *common.URL + func (r *MockRegistry) IsAvailable() bool + func (r *MockRegistry) MockEvent(event *ServiceEvent) + func (r *MockRegistry) MockEvents(events []*ServiceEvent) + func (r *MockRegistry) Subscribe(url *common.URL, notifyListener NotifyListener) error + func (r *MockRegistry) UnRegister(conf *common.URL) error + func (r *MockRegistry) UnSubscribe(url *common.URL, notifyListener NotifyListener) error + type NotifyListener interface + Notify func(*ServiceEvent) + NotifyAll func([]*ServiceEvent, func()) + type Registry interface + Register func(url *common.URL) error + Subscribe func(*common.URL, NotifyListener) error + UnRegister func(url *common.URL) error + UnSubscribe func(*common.URL, NotifyListener) error + func NewMockRegistry(url *common.URL) (Registry, error) + type RegistryFactory interface + GetRegistries func() []Registry + type ServiceDiscovery interface + AddListener func(listener ServiceInstancesChangedListener) error + Destroy func() error + GetDefaultPageSize func() int + GetHealthyInstancesByPage func(serviceName string, offset int, pageSize int, healthy bool) gxpage.Pager + GetInstances func(serviceName string) []ServiceInstance + GetInstancesByPage func(serviceName string, offset int, pageSize int) gxpage.Pager + GetRequestInstances func(serviceNames []string, offset int, requestedSize int) map[string]gxpage.Pager + GetServices func() *gxset.HashSet + Register func(instance ServiceInstance) error + Unregister func(instance ServiceInstance) error + Update func(instance ServiceInstance) error + type ServiceDiscoveryHolder interface + GetServiceDiscovery func() ServiceDiscovery + type ServiceEvent struct + Action remoting.EventType + KeyFunc KeyFunc + Service *common.URL + func (e *ServiceEvent) Key() string + func (e *ServiceEvent) String() string + func (e *ServiceEvent) Update(url *common.URL) + func (e *ServiceEvent) Updated() bool + type ServiceInstance interface + Copy func(endpoint *Endpoint) ServiceInstance + GetAddress func() string + GetEndPoints func() []*Endpoint + GetHost func() string + GetID func() string + GetMetadata func() map[string]string + GetPort func() int + GetServiceName func() string + IsEnable func() bool + IsHealthy func() bool + SetServiceMetadata func(info *common.MetadataInfo) + ToURLs func() []*common.URL + type ServiceInstanceCustomizer interface + Customize func(instance ServiceInstance) + type ServiceInstancesChangedEvent struct + Instances []ServiceInstance + ServiceName string + func NewServiceInstancesChangedEvent(serviceName string, instances []ServiceInstance) *ServiceInstancesChangedEvent + func (s *ServiceInstancesChangedEvent) String() string + type ServiceInstancesChangedListener interface + Accept func(e observer.Event) bool + AddListenerAndNotify func(serviceKey string, notify NotifyListener) + GetEventType func() reflect.Type + GetPriority func() int + GetServiceNames func() *gxset.HashSet + OnEvent func(e observer.Event) error + RemoveListener func(serviceKey string)