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 `mapstructure:"host"` // 主机地址 Port uint64 `mapstructure:"port"` // 主机端口号 Namespace string `mapstructure:"namespace"` // 名称空间 User string `mapstructure:"user"` // 用户 Password string `mapstructure:"password"` //密码 DataId string `mapstructure:"dataid"` // dataid Group string `mapstructure:"group"` // 组 }
Config nacos配置
type ConsulConfig ¶
type ConsulConfig struct { Host string `mapstructure:"host" json:"host"` // 主机 Port int `mapstructure:"port" json:"port"` // 端口号 }
ConsulConfig consul配置
type MysqlConfig ¶
type MysqlConfig struct { Host string `mapstructure:"host" json:"host"` // 主机地址 Port int `mapstructure:"port" json:"port"` // 端口号 Name string `mapstructure:"db" json:"database"` // 数据库名称 User string `mapstructure:"user" json:"username"` // 用户名 Password string `mapstructure:"password" json:"password"` // 密码 }
MysqlConfig MySQL配置信息
type Nacos ¶
type Nacos struct {
// contains filtered or unexported fields
}
Nacos nacos核心对象
func New ¶
func New(config NacosConfig) *Nacos
func (*Nacos) GetContent ¶
GetContent 获取nacos配置信息 @param dataId 配置组id @param group 配置组名称 @return content 配置内容
func (*Nacos) ListenConfig ¶
ListenConfig 监听nacos配置 @param group 配置组名称 @param content 配置内容 @param config 配置对象
func (*Nacos) ParseJsonConfig ¶
ParseJsonConfig 解析Json配置 @param config 配置对象 @param jsonContent json配置内容
type NacosConfig ¶
type ServiceConfig ¶
type ServiceConfig struct { Name string `mapstructure:"name" json:"name"` // 服务名称 MysqlInfo MysqlConfig `mapstructure:"mysql" json:"mysql"` // MySQL配置 ConsulInfo ConsulConfig `mapstructure:"consul" json:"consul"` // consul配置 }
ServiceConfig service配置
Directories ¶
Path | Synopsis |
---|---|
Package errors provides errors that have stack-traces.
|
Package errors provides errors that have stack-traces. |
Package ini provides INI file read and write functionality in Go.
|
Package ini provides INI file read and write functionality in Go. |
Package jsoniter implements encoding and decoding of JSON as defined in RFC 4627 and provides interfaces with identical syntax of standard lib encoding/json.
|
Package jsoniter implements encoding and decoding of JSON as defined in RFC 4627 and provides interfaces with identical syntax of standard lib encoding/json. |
mock
|
|
gomock
Package gomock is a mock framework for Go.
|
Package gomock is a mock framework for Go. |
gomock/internal/mock_gomock
Package mock_gomock is a generated GoMock package.
|
Package mock_gomock is a generated GoMock package. |
sample
Package user is an example package with an interface.
|
Package user is an example package with an interface. |
sample/concurrent
Package concurrent demonstrates how to use gomock with goroutines.
|
Package concurrent demonstrates how to use gomock with goroutines. |
sample/concurrent/mock
Package mock_concurrent is a generated GoMock package.
|
Package mock_concurrent is a generated GoMock package. |
nacos
|
|
clients/naming_client
* Copyright 1999-2020 Alibaba Group Holding Ltd.
|
* Copyright 1999-2020 Alibaba Group Holding Ltd. |
common/http_agent
* Copyright 1999-2020 Alibaba Group Holding Ltd.
|
* Copyright 1999-2020 Alibaba Group Holding Ltd. |
inner/uuid
Package uuid provides implementation of Universally Unique Identifier (UUID).
|
Package uuid provides implementation of Universally Unique Identifier (UUID). |
mock
Package mock is a generated GoMock package.
|
Package mock is a generated GoMock package. |
Package errors provides simple error handling primitives.
|
Package errors provides simple error handling primitives. |
auth/credentials/providers
Package providers Deprecated
|
Package providers Deprecated |
endpoints
* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
|
* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. |
test
|
|
toolkits_concurrent
|
|
Click to show internal directories.
Click to hide internal directories.