agollo

package module
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

README

Agollo - Go Client for Apollo

golang Build Status Go Report Card codebeat badge Coverage Status License GoDoc GitHub release 996.icu

方便Golang接入配置中心框架 Apollo 所开发的Golang版本客户端。

Features

  • 实时同步配置
  • 灰度配置
  • 延迟加载(运行时)namespace
  • 客户端,配置文件容灾
  • 自定义日志,缓存组件

Usage

使用Demoagollo_demo

其他语言agollo-agent 做本地agent接入,如:PHP

欢迎查阅 Wiki 或者 godoc 获取更多有用的信息

如果你觉得该工具还不错或者有问题,一定要让我知道,可以发邮件或者留言

User

Contribution

License

The project is licensed under the Apache 2 license.

Reference

Apollo : https://github.com/ctripcorp/apollo

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetApolloConfigCache added in v0.0.7

func GetApolloConfigCache() agcache.CacheInterface

GetApolloConfigCache 获取默认namespace的apollo配置

func GetBoolValue

func GetBoolValue(key string, defaultValue bool) bool

GetBoolValue 获取bool 配置值

func GetConfig added in v1.5.2

func GetConfig(namespace string) *storage.Config

GetConfig 根据namespace获取apollo配置

func GetConfigAndInit added in v1.5.2

func GetConfigAndInit(namespace string) *storage.Config

GetConfigAndInit 根据namespace获取apollo配置

func GetConfigCache added in v1.5.2

func GetConfigCache(namespace string) agcache.CacheInterface

GetConfigCache 根据namespace获取apollo配置的缓存

func GetDefaultConfigCache added in v1.5.2

func GetDefaultConfigCache() agcache.CacheInterface

GetDefaultConfigCache 获取默认缓存

func GetFloatValue

func GetFloatValue(key string, defaultValue float64) float64

GetFloatValue 获取float配置值

func GetIntValue

func GetIntValue(key string, defaultValue int) int

GetIntValue 获取int配置值

func GetStringValue

func GetStringValue(key string, defaultValue string) string

GetStringValue 获取string配置值

func GetValue added in v1.5.2

func GetValue(key string) string

GetValue 获取配置

func InitCustomConfig added in v1.4.0

func InitCustomConfig(loadAppConfig func() (*config.AppConfig, error))

InitCustomConfig init config by custom

func SetCache added in v1.5.2

func SetCache(cacheFactory agcache.CacheFactory)

SetCache 设置自定义cache组件

func SetLogger added in v1.5.2

func SetLogger(loggerInterface log.LoggerInterface)

SetLogger 设置自定义logger组件

func Start

func Start() error

start apollo

Types

This section is empty.

Directories

Path Synopsis
log
env
protocol

Jump to

Keyboard shortcuts

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