Documentation ¶
Index ¶
- func GetMetadataInfo(instance registry.ServiceInstance, revision string) (*common.MetadataInfo, error)
- func InboundInterfacesFor(ctx context.Context, url *common.URL) ([]*mesh_proto.Dataplane_Networking_Inbound, error)
- func NewDubboSDNotifyListener(services *gxset.HashSet) registry.ServiceInstancesChangedListener
- func OutboundInterfacesFor(ctx context.Context, url *common.URL) ([]*mesh_proto.Dataplane_Networking_Outbound, error)
- type DubboSDNotifyListener
- func (lstn *DubboSDNotifyListener) Accept(e observer.Event) bool
- func (lstn *DubboSDNotifyListener) AddListenerAndNotify(serviceKey string, notify registry.NotifyListener)
- func (lstn *DubboSDNotifyListener) GetEventType() reflect.Type
- func (lstn *DubboSDNotifyListener) GetPriority() int
- func (lstn *DubboSDNotifyListener) GetServiceNames() *gxset.HashSet
- func (lstn *DubboSDNotifyListener) OnEvent(e observer.Event) error
- func (lstn *DubboSDNotifyListener) RemoveListener(serviceKey string)
- type MetadataInstance
- type NotifyListener
- type Registry
- type ServiceMappingChangedListenerImpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMetadataInfo ¶
func GetMetadataInfo(instance registry.ServiceInstance, revision string) (*common.MetadataInfo, error)
GetMetadataInfo get metadata info when MetadataStorageTypePropertyName is null
func InboundInterfacesFor ¶
func InboundInterfacesFor(ctx context.Context, url *common.URL) ([]*mesh_proto.Dataplane_Networking_Inbound, error)
func NewDubboSDNotifyListener ¶
func NewDubboSDNotifyListener(services *gxset.HashSet) registry.ServiceInstancesChangedListener
func OutboundInterfacesFor ¶
func OutboundInterfacesFor(ctx context.Context, url *common.URL) ([]*mesh_proto.Dataplane_Networking_Outbound, error)
Types ¶
type DubboSDNotifyListener ¶
type DubboSDNotifyListener struct {
// contains filtered or unexported fields
}
DubboSDNotifyListener The Service Discovery Changed Event Listener
func (*DubboSDNotifyListener) Accept ¶
func (lstn *DubboSDNotifyListener) Accept(e observer.Event) bool
Accept return true if the name is the same
func (*DubboSDNotifyListener) AddListenerAndNotify ¶
func (lstn *DubboSDNotifyListener) AddListenerAndNotify(serviceKey string, notify registry.NotifyListener)
AddListenerAndNotify add notify listener and notify to listen service event
func (*DubboSDNotifyListener) GetEventType ¶
func (lstn *DubboSDNotifyListener) GetEventType() reflect.Type
GetEventType returns ServiceInstancesChangedEvent
func (*DubboSDNotifyListener) GetPriority ¶
func (lstn *DubboSDNotifyListener) GetPriority() int
GetPriority returns -1, it will be the first invoked listener
func (*DubboSDNotifyListener) GetServiceNames ¶
func (lstn *DubboSDNotifyListener) GetServiceNames() *gxset.HashSet
GetServiceNames return all listener service names
func (*DubboSDNotifyListener) OnEvent ¶
func (lstn *DubboSDNotifyListener) OnEvent(e observer.Event) error
OnEvent on ServiceInstancesChangedEvent the service instances change event
func (*DubboSDNotifyListener) RemoveListener ¶
func (lstn *DubboSDNotifyListener) RemoveListener(serviceKey string)
RemoveListener remove notify listener
type MetadataInstance ¶
type MetadataInstance struct {
registry.ServiceInstance
}
func ConvertToMetadataInstance ¶
func ConvertToMetadataInstance(serviceInstance registry.ServiceInstance) *MetadataInstance
func (*MetadataInstance) GetServiceName ¶
func (m *MetadataInstance) GetServiceName() string
type NotifyListener ¶
type NotifyListener struct { manager.ResourceManager // contains filtered or unexported fields }
func NewNotifyListener ¶
func NewNotifyListener( manager manager.ResourceManager, cache *sync.Map, discovery dubboRegistry.ServiceDiscovery, writer events.Emitter, ) *NotifyListener
func (*NotifyListener) Notify ¶
func (l *NotifyListener) Notify(event *dubboRegistry.ServiceEvent)
func (*NotifyListener) NotifyAll ¶
func (l *NotifyListener) NotifyAll(events []*dubboRegistry.ServiceEvent, f func())
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func NewRegistry(delegate dubboRegistry.Registry, sdDelegate dubboRegistry.ServiceDiscovery) *Registry
func (*Registry) Delegate ¶
func (r *Registry) Delegate() dubboRegistry.Registry
func (*Registry) Subscribe ¶
func (r *Registry) Subscribe( metadataReport report.MetadataReport, resourceManager core_manager.ResourceManager, cache *sync.Map, discovery dubboRegistry.ServiceDiscovery, out events.Emitter, systemNamespace string, ) error
type ServiceMappingChangedListenerImpl ¶
type ServiceMappingChangedListenerImpl struct {
// contains filtered or unexported fields
}
func NewMappingListener ¶
func NewMappingListener( interfaceKey string, oldServiceNames *gxset.HashSet, listener registry.NotifyListener, writer events.Emitter, systemNamespace string, delSDRegistry registry.ServiceDiscovery, ) *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