baseregistry

package
v0.4.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseRegistry

type BaseRegistry struct {
	AdapterListener common.RegistryEventListener
	// contains filtered or unexported fields
}

func NewBaseRegistry

func NewBaseRegistry(facade FacadeRegistry, adapterListener common.RegistryEventListener) *BaseRegistry

func (*BaseRegistry) GetAllSvcListener

func (r *BaseRegistry) GetAllSvcListener() map[string]registry.Listener

GetAllSvcListener get all the listener of the registry

func (*BaseRegistry) GetSvcListener

func (r *BaseRegistry) GetSvcListener(id string) registry.Listener

GetSvcListener returns existing listener or nil

func (*BaseRegistry) RemoveSvcListener

func (r *BaseRegistry) RemoveSvcListener(id string)

RemoveSvcListener remove the listener of the registry

func (*BaseRegistry) SetSvcListener

func (r *BaseRegistry) SetSvcListener(id string, listener registry.Listener)

SetSvcListener set the listener to the registry

func (*BaseRegistry) Subscribe

func (r *BaseRegistry) Subscribe() error

Subscribe monitors the target registry.

func (*BaseRegistry) Unsubscribe

func (r *BaseRegistry) Unsubscribe() error

Unsubscribe stops monitoring the target registry.

type FacadeRegistry

type FacadeRegistry interface {
	// DoSubscribe subscribes the registry cluster to monitor the changes.
	DoSubscribe() error
	// DoUnsubscribe unsubscribes the registry cluster.
	DoUnsubscribe() error
}

type SvcListeners

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

func (*SvcListeners) GetAllListener

func (s *SvcListeners) GetAllListener() map[string]registry.Listener

func (*SvcListeners) GetListener

func (s *SvcListeners) GetListener(id string) registry.Listener

GetListener returns existing listener or nil

func (*SvcListeners) RemoveListener

func (s *SvcListeners) RemoveListener(id string)

RemoveListener removes the listener of the registry

func (*SvcListeners) SetListener

func (s *SvcListeners) SetListener(id string, listener registry.Listener)

SetListener set the listener to the registry

Jump to

Keyboard shortcuts

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