nacos

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: MIT Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package nacos implements onexmesh registry.Registrar and registry.Discovery backed by the Nacos service discovery (github.com/nacos-group/nacos-sdk-go).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDiscovery

func NewDiscovery(opts Options) (registry.Discovery, error)

NewDiscovery creates a Nacos Discovery.

func NewRegistrar

func NewRegistrar(opts Options) (registry.Registrar, error)

NewRegistrar creates a Nacos Registrar.

Types

type Options

type Options struct {
	// Addr is the Nacos server address, e.g. "127.0.0.1:8848".
	Addr string
	// ContextPath is the Nacos server context path, e.g. "/nacos".
	ContextPath string
	// NamespaceID is the Nacos namespace ID. Empty means the public namespace.
	NamespaceID string
	// GroupName is the service group name. Default "DEFAULT_GROUP".
	GroupName string
	// ClusterName is the service cluster name. Default "DEFAULT".
	ClusterName string
	// Username and Password enable Nacos auth when set.
	Username string
	Password string
	// Host is the local instance host used for registration.
	Host string
	// Port is the local instance port used for registration.
	Port int
	// Weight is the instance weight. Default 100.
	Weight float64
	// Protocol is the service protocol, e.g. "grpc" or "http".
	Protocol string
}

Options configures the Nacos backend.

Jump to

Keyboard shortcuts

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