nacos

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

README

nacos

介绍

nacos官方地址:https://nacos.io/zh-cn/

作用

从nacos读取配置

使用

1)后台 nacos 后台开发环境地址是:http://10.4.7.71:8848/nacos

nacos/nacos

2)代码使用

参考 nacos_test.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host      string
	Port      uint64
	Namespace string
	User      string
	Password  string
}

func (*Config) GetConfig

func (t *Config) GetConfig(dataId string, groupName string) (confContent string, err error)

直接读取 nacos 的配置信息

func (*Config) GetConfigClient

func (t *Config) GetConfigClient() (config_client.IConfigClient, error)

获取nacos的 IConfigClient

type ConfigClient

type ConfigClient interface {
	GetConfig(dataId string, groupName string) (confContent string, err error)
	GetConfigClient() (config_client.IConfigClient, error)
}

func NewConfigClient

func NewConfigClient(host string, port uint64, namespace string, user string, password string) ConfigClient

Jump to

Keyboard shortcuts

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