Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewNacosV2Discovery ¶
NewNacosV2Discovery returns a new NacosV2Discovery.
Types ¶
type NacosServiceClient ¶
type NacosServiceClient struct { naming_client.INamingClient NamespaceId string Servers []string // ip+port, like 127.0.0.1:8848 // contains filtered or unexported fields }
func NewNacosServiceClient ¶
func NewNacosServiceClient(options map[string]interface{}) (*NacosServiceClient, error)
func (*NacosServiceClient) SelectAllServiceInstances ¶
func (ngsc *NacosServiceClient) SelectAllServiceInstances() []model.Instance
type NacosV2Discovery ¶
type NacosV2Discovery struct {
// contains filtered or unexported fields
}
NacosV2Discovery is a nacos service discovery. It always returns the registered servers in etcd.
func (*NacosV2Discovery) Close ¶
func (nd *NacosV2Discovery) Close()
func (*NacosV2Discovery) GetServices ¶
func (nd *NacosV2Discovery) GetServices() []*base.ServiceInstance
GetServices returns the servers
func (*NacosV2Discovery) WatchService ¶
func (nd *NacosV2Discovery) WatchService() <-chan []*base.ServiceInstance
WatchService returns a nil chan.
type NacosV2Registry ¶
type NacosV2Registry struct {
// contains filtered or unexported fields
}
func (*NacosV2Registry) Register ¶
func (ng *NacosV2Registry) Register(ctx context.Context, serviceInstance *base.ServiceInstance) error
func (*NacosV2Registry) Unregister ¶
func (ng *NacosV2Registry) Unregister(ctx context.Context, name string) error
func (*NacosV2Registry) UnregisterAllService ¶
func (ng *NacosV2Registry) UnregisterAllService(ctx context.Context) error
Click to show internal directories.
Click to hide internal directories.