Documentation
¶
Index ¶
- Variables
- type Option
- type Registry
- func (r *Registry) Deregister(_ context.Context, service *registry.ServiceInstance) error
- func (r *Registry) GetService(_ context.Context, serviceName string) ([]*registry.ServiceInstance, error)
- func (r *Registry) Register(_ context.Context, si *registry.ServiceInstance) error
- func (r *Registry) Watch(ctx context.Context, serviceName string) (registry.Watcher, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrServiceInstanceNameEmpty = errors.New("kratos/nacos: ServiceInstance.Name can not be empty")
Functions ¶
This section is empty.
Types ¶
type Option ¶ added in v0.1.0
type Option func(o *options)
Option is nacos option.
func WithCluster ¶ added in v0.1.0
WithCluster with a cluster option.
func WithDefaultKind ¶ added in v0.1.0
WithDefaultKind with a default kind option.
func WithPrefix ¶ added in v0.1.0
WithPrefix with a prefix path.
func WithWeight ¶ added in v0.1.0
WithWeight with a weight option.
type Registry ¶ added in v0.1.0
type Registry struct {
// contains filtered or unexported fields
}
Registry is nacos registry.
func New ¶ added in v0.1.0
func New(cli naming_client.INamingClient, opts ...Option) (r *Registry)
New a nacos registry.
func (*Registry) Deregister ¶ added in v0.1.0
Deregister the registration.
func (*Registry) GetService ¶ added in v0.1.0
func (r *Registry) GetService(_ context.Context, serviceName string) ([]*registry.ServiceInstance, error)
GetService return the service instances in memory according to the service name.
Click to show internal directories.
Click to hide internal directories.