Versions in this module Expand all Collapse all v1 v1.0.0 Feb 27, 2026 Changes in this version + var ErrServiceInstanceNameEmpty = errors.New("kratos/nacos: ServiceInstance.Name can not be empty") + var ProviderSet = wire.NewSet(NewNamingClient, NewConfigClient, NewRegistryEngine) + func NewConfigClient(cfg Conf) (iClient config_client.IConfigClient, err error) + func NewConfigSource(cli config_client.IConfigClient, opts ...Option) config.Source + func NewNacosConfigSource(cfg Conf, cc config_client.IConfigClient) (config.Source, error) + func NewNamingClient(cfg Conf) (naming_client.INamingClient, error) + type Conf struct + Addr string + ClusterName string + DataId string + EnableTLS bool + GroupId string + LogDir string + NamespaceId string + Password string + Port uint64 + Scheme string + TLSCAFile string + TLSCertFile string + TLSKeyFile string + TLSTrustAll bool + Username string + Weight int32 + type ConfigSource struct + func (s *ConfigSource) Load() ([]*config.KeyValue, error) + func (s *ConfigSource) Watch() (config.Watcher, error) + type Option func(o *options) + func WithCluster(cluster string) Option + func WithDataID(dataID string) Option + func WithDefaultKind(kind string) Option + func WithGroup(group string) Option + func WithPrefix(prefix string) Option + func WithWeight(weight float64) Option + type Registry struct + func New(cli naming_client.INamingClient, opts ...Option) *Registry + func NewRegistryEngine(cfg Conf, nc naming_client.INamingClient) (*Registry, error) + func NewRegistryEngineSimple(cfg Conf) (*Registry, error) + func (r *Registry) Deregister(_ context.Context, si *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)