You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Example of how the configuration might look in Go for zrpc with Nacos cluster
import (
"github.com/zeromicro/zero-contrib/zrpc/registry/nacos"
)
func main() {
// Assuming we have a list of Nacos server addresses
nacosServers := []string{
"192.168.1.1:8848",
"192.168.1.2:8848",
"192.168.1.3:8848",
}
// Configuration for Nacos registry in cluster mode
nacosConf := nacos.NacosConfig{
Endpoint: "nacos-cluster.com", // This could be a domain name pointing to an SLB
NamespaceId: "public",
ClusterName: "cluster-1",
ServiceName: "my-service",
GroupName: "DEFAULT_GROUP",
// Assuming there's a way to pass multiple server addresses
ServerAddrs: nacosServers,
}
// Initialize the registry with the cluster configuration
registry, err := nacos.NewNacosRegistry(nacosConf)
if err != nil {
panic(err)
}
// Use this registry in your zrpc server setup
// ... (rest of the server setup code)
}
https://github.com/zeromicro/zero-contrib/tree/main/zrpc/registry/nacos Currently, nacos only supports single address configuration, not nacos cluster configuration.
If i want to support cluster mode, how to configure it?
The text was updated successfully, but these errors were encountered: