servicediscovery

package
v3.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2025 License: Apache-2.0 Imports: 25 Imported by: 4

Documentation

Index

Constants

View Source
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

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

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

OnEvent on ServiceMappingChangedEvent the service mapping change event

func (*ServiceMappingChangedListenerImpl) Stop

func (lstn *ServiceMappingChangedListenerImpl) Stop()

Stop on ServiceMappingChangedEvent the service mapping change event

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL