Documentation
¶
Index ¶
- Constants
- func GetMetadataInfo(app string, instance registry.ServiceInstance, revision string) (*info.MetadataInfo, error)
- func NewServiceInstancesChangedListener(app string, services *gxset.HashSet) registry.ServiceInstancesChangedListener
- type ServiceInstancesChangedListenerImpl
- func (lstn *ServiceInstancesChangedListenerImpl) Accept(e observer.Event) bool
- func (lstn *ServiceInstancesChangedListenerImpl) AddListenerAndNotify(serviceKey string, notify registry.NotifyListener)
- func (lstn *ServiceInstancesChangedListenerImpl) GetEventType() reflect.Type
- func (lstn *ServiceInstancesChangedListenerImpl) GetPriority() int
- func (lstn *ServiceInstancesChangedListenerImpl) GetServiceNames() *gxset.HashSet
- func (lstn *ServiceInstancesChangedListenerImpl) OnEvent(e observer.Event) error
- func (lstn *ServiceInstancesChangedListenerImpl) RemoveListener(serviceKey string)
- type ServiceMappingChangedListenerImpl
Constants ¶
const ( ServiceMappingListenerStart = iota ServiceMappingListenerStop )
Variables ¶
This section is empty.
Functions ¶
func GetMetadataInfo ¶
func GetMetadataInfo(app string, instance registry.ServiceInstance, revision string) (*info.MetadataInfo, error)
GetMetadataInfo get metadata info when MetadataStorageTypePropertyName is null
func NewServiceInstancesChangedListener ¶
func NewServiceInstancesChangedListener(app string, services *gxset.HashSet) registry.ServiceInstancesChangedListener
Types ¶
type ServiceInstancesChangedListenerImpl ¶
type ServiceInstancesChangedListenerImpl struct {
// contains filtered or unexported fields
}
ServiceInstancesChangedListenerImpl The Service Discovery Changed Event Listener
func (*ServiceInstancesChangedListenerImpl) Accept ¶
func (lstn *ServiceInstancesChangedListenerImpl) Accept(e observer.Event) bool
Accept return true if the name is the same
func (*ServiceInstancesChangedListenerImpl) AddListenerAndNotify ¶
func (lstn *ServiceInstancesChangedListenerImpl) AddListenerAndNotify(serviceKey string, notify registry.NotifyListener)
AddListenerAndNotify add notify listener and notify to listen service event
func (*ServiceInstancesChangedListenerImpl) GetEventType ¶
func (lstn *ServiceInstancesChangedListenerImpl) GetEventType() reflect.Type
GetEventType returns ServiceInstancesChangedEvent
func (*ServiceInstancesChangedListenerImpl) GetPriority ¶
func (lstn *ServiceInstancesChangedListenerImpl) GetPriority() int
GetPriority returns -1, it will be the first invoked listener
func (*ServiceInstancesChangedListenerImpl) GetServiceNames ¶
func (lstn *ServiceInstancesChangedListenerImpl) GetServiceNames() *gxset.HashSet
GetServiceNames return all listener service names
func (*ServiceInstancesChangedListenerImpl) OnEvent ¶
func (lstn *ServiceInstancesChangedListenerImpl) OnEvent(e observer.Event) error
OnEvent on ServiceInstancesChangedEvent the service instances change event
func (*ServiceInstancesChangedListenerImpl) RemoveListener ¶
func (lstn *ServiceInstancesChangedListenerImpl) RemoveListener(serviceKey string)
RemoveListener remove notify listener
type ServiceMappingChangedListenerImpl ¶
type ServiceMappingChangedListenerImpl struct {
// contains filtered or unexported fields
}
func NewMappingListener ¶
func NewMappingListener(registryUrl *common.URL, serviceUrl *common.URL, oldServiceNames *gxset.HashSet, listener registry.NotifyListener) *ServiceMappingChangedListenerImpl
func (*ServiceMappingChangedListenerImpl) OnEvent ¶
func (lstn *ServiceMappingChangedListenerImpl) OnEvent(e observer.Event) error
OnEvent on ServiceMappingChangedEvent the service mapping change event
func (*ServiceMappingChangedListenerImpl) Stop ¶
func (lstn *ServiceMappingChangedListenerImpl) Stop()
Stop on ServiceMappingChangedEvent the service mapping change event