event

package
v1.5.11 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServiceInstancesChangedListener

func NewServiceInstancesChangedListener(services *gxset.HashSet) registry.ServiceInstancesChangedListener

func ToConfigurators

func ToConfigurators(urls []*common.URL, f func(url *common.URL) config_center.Configurator) []config_center.Configurator

ToConfigurators converts @urls by @f to config_center.Configurators

Types

type BaseConfigurationListener

type BaseConfigurationListener struct {
	// contains filtered or unexported fields
}

nolint

func (*BaseConfigurationListener) Configurators

func (bcl *BaseConfigurationListener) Configurators() []config_center.Configurator

Configurators gets Configurator from config center

func (*BaseConfigurationListener) InitWith

InitWith will init BaseConfigurationListener by @key+@Listener+@f

func (*BaseConfigurationListener) OverrideUrl

func (bcl *BaseConfigurationListener) OverrideUrl(url *common.URL)

OverrideUrl gets existing configuration rule and overrides provider url before exporting.

func (*BaseConfigurationListener) Process

Process the notification event once there's any change happens on the config.

type ProtocolPortsMetadataCustomizer

type ProtocolPortsMetadataCustomizer struct {
}

ProtocolPortsMetadataCustomizer will update the endpoints

func (*ProtocolPortsMetadataCustomizer) Customize

Customize put the the string like [{"protocol": "dubbo", "port": 123}] into instance's metadata

func (*ProtocolPortsMetadataCustomizer) GetPriority

func (p *ProtocolPortsMetadataCustomizer) GetPriority() int

GetPriority will return 0, which means it will be invoked at the beginning

type ServiceInstancesChangedListenerImpl

type ServiceInstancesChangedListenerImpl struct {
	// contains filtered or unexported fields
}

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

Jump to

Keyboard shortcuts

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