Documentation ¶
Index ¶
- func GetCustomizableServiceInstanceListener() observer.EventListener
- func GetLogEventListener() observer.EventListener
- func GetServiceNameMappingListener() observer.EventListener
- type EventPublishingServiceDiscovery
- func (epsd *EventPublishingServiceDiscovery) AddListener(listener *registry.ServiceInstancesChangedListener) error
- func (epsd *EventPublishingServiceDiscovery) Destroy() error
- func (epsd *EventPublishingServiceDiscovery) DispatchEvent(event *registry.ServiceInstancesChangedEvent) error
- func (epsd *EventPublishingServiceDiscovery) DispatchEventByServiceName(serviceName string) error
- func (epsd *EventPublishingServiceDiscovery) DispatchEventForInstances(serviceName string, instances []registry.ServiceInstance) error
- func (epsd *EventPublishingServiceDiscovery) GetDefaultPageSize() int
- func (epsd *EventPublishingServiceDiscovery) GetHealthyInstancesByPage(serviceName string, offset int, pageSize int, healthy bool) gxpage.Pager
- func (epsd *EventPublishingServiceDiscovery) GetInstances(serviceName string) []registry.ServiceInstance
- func (epsd *EventPublishingServiceDiscovery) GetInstancesByPage(serviceName string, offset int, pageSize int) gxpage.Pager
- func (epsd *EventPublishingServiceDiscovery) GetRequestInstances(serviceNames []string, offset int, requestedSize int) map[string]gxpage.Pager
- func (epsd *EventPublishingServiceDiscovery) GetServices() *gxset.HashSet
- func (epsd *EventPublishingServiceDiscovery) Register(instance registry.ServiceInstance) error
- func (epsd *EventPublishingServiceDiscovery) String() string
- func (epsd *EventPublishingServiceDiscovery) Unregister(instance registry.ServiceInstance) error
- func (epsd *EventPublishingServiceDiscovery) Update(instance registry.ServiceInstance) error
- type ProtocolPortsMetadataCustomizer
- type ServiceConfigExportedEvent
- type ServiceDiscoveryDestroyedEvent
- type ServiceDiscoveryDestroyingEvent
- type ServiceDiscoveryEvent
- type ServiceDiscoveryExceptionEvent
- type ServiceDiscoveryInitializedEvent
- type ServiceDiscoveryInitializingEvent
- type ServiceInstanceEvent
- type ServiceInstancePreRegisteredEvent
- type ServiceInstancePreUnregisteredEvent
- type ServiceInstanceRegisteredEvent
- type ServiceInstanceUnregisteredEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCustomizableServiceInstanceListener ¶
func GetCustomizableServiceInstanceListener() observer.EventListener
GetCustomizableServiceInstanceListener returns an instance if the instance was not initialized, we create one
func GetLogEventListener ¶
func GetLogEventListener() observer.EventListener
func GetServiceNameMappingListener ¶
func GetServiceNameMappingListener() observer.EventListener
GetServiceNameMappingListener returns an instance
Types ¶
type EventPublishingServiceDiscovery ¶
type EventPublishingServiceDiscovery struct {
// contains filtered or unexported fields
}
EventPublishingServiceDiscovery will enhance Service Discovery Publish some event about service discovery
func NewEventPublishingServiceDiscovery ¶
func NewEventPublishingServiceDiscovery(serviceDiscovery registry.ServiceDiscovery) *EventPublishingServiceDiscovery
NewEventPublishingServiceDiscovery is a constructor
func (*EventPublishingServiceDiscovery) AddListener ¶
func (epsd *EventPublishingServiceDiscovery) AddListener(listener *registry.ServiceInstancesChangedListener) error
AddListener add event listener
func (*EventPublishingServiceDiscovery) Destroy ¶
func (epsd *EventPublishingServiceDiscovery) Destroy() error
Destroy delegate function
func (*EventPublishingServiceDiscovery) DispatchEvent ¶
func (epsd *EventPublishingServiceDiscovery) DispatchEvent(event *registry.ServiceInstancesChangedEvent) error
DispatchEvent pass the event to serviceDiscovery
func (*EventPublishingServiceDiscovery) DispatchEventByServiceName ¶
func (epsd *EventPublishingServiceDiscovery) DispatchEventByServiceName(serviceName string) error
DispatchEventByServiceName pass serviceName to serviceDiscovery
func (*EventPublishingServiceDiscovery) DispatchEventForInstances ¶
func (epsd *EventPublishingServiceDiscovery) DispatchEventForInstances(serviceName string, instances []registry.ServiceInstance) error
DispatchEventForInstances pass params to serviceDiscovery
func (*EventPublishingServiceDiscovery) GetDefaultPageSize ¶
func (epsd *EventPublishingServiceDiscovery) GetDefaultPageSize() int
GetDefaultPageSize returns the result of serviceDiscovery.GetDefaultPageSize
func (*EventPublishingServiceDiscovery) GetHealthyInstancesByPage ¶
func (epsd *EventPublishingServiceDiscovery) GetHealthyInstancesByPage(serviceName string, offset int, pageSize int, healthy bool) gxpage.Pager
GetHealthyInstancesByPage returns the result of serviceDiscovery.GetHealthyInstancesByPage
func (*EventPublishingServiceDiscovery) GetInstances ¶
func (epsd *EventPublishingServiceDiscovery) GetInstances(serviceName string) []registry.ServiceInstance
GetInstances returns the result of serviceDiscovery.GetInstances
func (*EventPublishingServiceDiscovery) GetInstancesByPage ¶
func (epsd *EventPublishingServiceDiscovery) GetInstancesByPage(serviceName string, offset int, pageSize int) gxpage.Pager
GetInstancesByPage returns the result of serviceDiscovery.GetInstancesByPage
func (*EventPublishingServiceDiscovery) GetRequestInstances ¶
func (epsd *EventPublishingServiceDiscovery) GetRequestInstances(serviceNames []string, offset int, requestedSize int) map[string]gxpage.Pager
GetRequestInstances returns result from serviceDiscovery.GetRequestInstances
func (*EventPublishingServiceDiscovery) GetServices ¶
func (epsd *EventPublishingServiceDiscovery) GetServices() *gxset.HashSet
GetServices returns the result of serviceDiscovery.GetServices
func (*EventPublishingServiceDiscovery) Register ¶
func (epsd *EventPublishingServiceDiscovery) Register(instance registry.ServiceInstance) error
Register delegate function
func (*EventPublishingServiceDiscovery) String ¶
func (epsd *EventPublishingServiceDiscovery) String() string
String returns serviceDiscovery.String()
func (*EventPublishingServiceDiscovery) Unregister ¶
func (epsd *EventPublishingServiceDiscovery) Unregister(instance registry.ServiceInstance) error
Unregister unregister the instance and drop ServiceInstancePreUnregisteredEvent and ServiceInstanceUnregisteredEvent
func (*EventPublishingServiceDiscovery) Update ¶
func (epsd *EventPublishingServiceDiscovery) Update(instance registry.ServiceInstance) error
Update returns the result of serviceDiscovery.Update
type ProtocolPortsMetadataCustomizer ¶
type ProtocolPortsMetadataCustomizer struct { }
ProtocolPortsMetadataCustomizer will update the endpoints
func (*ProtocolPortsMetadataCustomizer) Customize ¶
func (p *ProtocolPortsMetadataCustomizer) Customize(instance registry.ServiceInstance)
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 ServiceConfigExportedEvent ¶
type ServiceConfigExportedEvent struct { observer.BaseEvent ServiceConfig *config.ServiceConfig }
ServiceConfigExportedEvent represents an service was exported
func NewServiceConfigExportedEvent ¶
func NewServiceConfigExportedEvent(serviceConfig *config.ServiceConfig) *ServiceConfigExportedEvent
NewServiceConfigExportedEvent create an instance
type ServiceDiscoveryDestroyedEvent ¶
type ServiceDiscoveryDestroyedEvent struct {
ServiceDiscoveryEvent
}
ServiceDiscoveryDestroyedEvent this event will be dispatched after service discovery be destroyed
func NewServiceDiscoveryDestroyedEvent ¶
func NewServiceDiscoveryDestroyedEvent(discovery registry.ServiceDiscovery, original registry.ServiceDiscovery) *ServiceDiscoveryDestroyedEvent
NewServiceDiscoveryDestroyedEvent create a ServiceDiscoveryDestroyedEvent
type ServiceDiscoveryDestroyingEvent ¶
type ServiceDiscoveryDestroyingEvent struct {
ServiceDiscoveryEvent
}
ServiceDiscoveryDestroyingEvent this event will be dispatched before service discovery be destroyed
func NewServiceDiscoveryDestroyingEvent ¶
func NewServiceDiscoveryDestroyingEvent(discovery registry.ServiceDiscovery, original registry.ServiceDiscovery) *ServiceDiscoveryDestroyingEvent
NewServiceDiscoveryDestroyingEvent create a ServiceDiscoveryDestroyingEvent
type ServiceDiscoveryEvent ¶
ServiceDiscoveryEvent means that something happens to service discovery instance
func NewServiceDiscoveryEvent ¶
func NewServiceDiscoveryEvent(discovery registry.ServiceDiscovery, original registry.ServiceDiscovery) *ServiceDiscoveryEvent
NewServiceDiscoveryEvent returns an instance
func (*ServiceDiscoveryEvent) GetOriginal ¶
func (sde *ServiceDiscoveryEvent) GetOriginal() registry.ServiceDiscovery
GetOriginal actually I think we can remove this method.
func (*ServiceDiscoveryEvent) GetServiceDiscovery ¶
func (sde *ServiceDiscoveryEvent) GetServiceDiscovery() registry.ServiceDiscovery
GetServiceDiscovery returns the event source
type ServiceDiscoveryExceptionEvent ¶
type ServiceDiscoveryExceptionEvent struct { ServiceDiscoveryEvent // contains filtered or unexported fields }
ServiceDiscoveryExceptionEvent this event will be dispatched when the error occur in service discovery
func NewServiceDiscoveryExceptionEvent ¶
func NewServiceDiscoveryExceptionEvent(discovery registry.ServiceDiscovery, original registry.ServiceDiscovery, err error) *ServiceDiscoveryExceptionEvent
NewServiceDiscoveryExceptionEvent create a ServiceDiscoveryExceptionEvent
type ServiceDiscoveryInitializedEvent ¶
type ServiceDiscoveryInitializedEvent struct {
ServiceDiscoveryEvent
}
ServiceDiscoveryInitializedEvent this event will be dispatched after service discovery initialize
func NewServiceDiscoveryInitializedEvent ¶
func NewServiceDiscoveryInitializedEvent(discovery registry.ServiceDiscovery, original registry.ServiceDiscovery) *ServiceDiscoveryInitializedEvent
NewServiceDiscoveryInitializedEvent create a ServiceDiscoveryInitializedEvent
type ServiceDiscoveryInitializingEvent ¶
type ServiceDiscoveryInitializingEvent struct {
ServiceDiscoveryEvent
}
ServiceDiscoveryInitializingEvent this event will be dispatched before service discovery initialize
func NewServiceDiscoveryInitializingEvent ¶
func NewServiceDiscoveryInitializingEvent(discovery registry.ServiceDiscovery, original registry.ServiceDiscovery) *ServiceDiscoveryInitializingEvent
NewServiceDiscoveryInitializingEvent create a ServiceDiscoveryInitializingEvent
type ServiceInstanceEvent ¶
ServiceInstanceEvent means something happen to this ServiceInstance like register this service instance
func NewServiceInstanceEvent ¶
func NewServiceInstanceEvent(source interface{}, instance registry.ServiceInstance) *ServiceInstanceEvent
NewServiceInstanceEvent create a ServiceInstanceEvent
type ServiceInstancePreRegisteredEvent ¶
type ServiceInstancePreRegisteredEvent struct {
ServiceInstanceEvent
}
ServiceInstancePreRegisteredEvent this event will be dispatched before service instance be registered
func NewServiceInstancePreRegisteredEvent ¶
func NewServiceInstancePreRegisteredEvent(source interface{}, instance registry.ServiceInstance) *ServiceInstancePreRegisteredEvent
NewServiceInstancePreRegisteredEvent create a ServiceInstancePreRegisteredEvent
type ServiceInstancePreUnregisteredEvent ¶
type ServiceInstancePreUnregisteredEvent struct {
ServiceInstanceEvent
}
ServiceInstancePreUnregisteredEvent this event will be dispatched before service instance be unregistered
func NewServiceInstancePreUnregisteredEvent ¶
func NewServiceInstancePreUnregisteredEvent(source interface{}, instance registry.ServiceInstance) *ServiceInstancePreUnregisteredEvent
NewServiceInstancePreUnregisteredEvent create a ServiceInstancePreUnregisteredEvent
type ServiceInstanceRegisteredEvent ¶
type ServiceInstanceRegisteredEvent struct {
ServiceInstanceEvent
}
ServiceInstanceRegisteredEvent this event will be dispatched after service instance be registered
func NewServiceInstanceRegisteredEvent ¶
func NewServiceInstanceRegisteredEvent(source interface{}, instance registry.ServiceInstance) *ServiceInstanceRegisteredEvent
NewServiceInstanceRegisteredEvent create a ServiceInstanceRegisteredEvent
type ServiceInstanceUnregisteredEvent ¶
type ServiceInstanceUnregisteredEvent struct {
ServiceInstanceEvent
}
ServiceInstanceRegisteredEvent this event will be dispatched after service instance be unregistered
func NewServiceInstanceUnregisteredEvent ¶
func NewServiceInstanceUnregisteredEvent(source interface{}, instance registry.ServiceInstance) *ServiceInstanceUnregisteredEvent
NewServiceInstanceUnregisteredEvent create a ServiceInstanceUnregisteredEvent
Source Files ¶
- customizable_service_instance_listener.go
- event_publishing_service_discovery.go
- log_event_listener.go
- metadata_service_url_params_customizer.go
- protocol_ports_metadata_customizer.go
- service_config_exported_event.go
- service_discovery_event.go
- service_instance_event.go
- service_name_mapping_listener.go
- service_revision_customizer.go