alibaba/acm-sdk-go

Name: acm-sdk-go

Owner: Alibaba

Description: null

Created: 2018-02-08 06:43:20.0

Updated: 2018-02-08 06:43:20.0

Pushed: 2018-02-09 07:20:54.0

Homepage: null

Size: 9

Language: null

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

ACM-GO-SDK

ACM-GO-SDK is a GOLANG sdk for ACM (Application Configuration Manangement), which is also named Diamond.

Features
DataID and GroupID

DataID is the config data set ID, for example, me.show.log.level is a config for system log level, cc.talk.http.listen is a config for HTTP server listening port, com.yourcompany.user.database is a set of config is insists of db connection informations. Recommend to use java package style for DataID.

GroupID is used to category the config data, it's a optional param and default to value DEFAULT_GROUP. Generally, since value of a config set is the same, we only use the DEFAULT_GROUP for a config set. For example:

| DataID | GroupID | Value |Description | |——–|———|——-|————| | me.show.log.level | DEFAULT_GROUP | trace | For all situations |

We will got config value me.show.log.level=trace for all servers. But sometimes, we may need to put them in different GroupID, to apply different values according to different server, for example:

| DataID | GroupID | Value |Description | |——–|———|——-|————| | me.show.log.level | DEFAULT_GROUP | trace | For all situations | | me.show.log.level | release | error | Default log level for all release servers | | me.show.log.level | release.CN01 | warn | Log level for released servers at CN01 | | me.show.log.level | release.CN01.11.34.23.187 | verbose | Log level for 11.34.23.187 at CN01 |

If we have servers here, we will got config bellow:

| Env | Location | IP | Config for server | |—–|———-|—-|—————-| | daily | CN01 | 10.98.63.14 | me.show.log.level+DEFAULT_GROUP=trace | | release | CN02 | 10.87.2.38 | me.show.log.level+release=error | | release | CN03 | 10.54.17.138 | me.show.log.level+release=error | | release | CN01 | 11.13.12.23 | me.show.log.level+release.CN01=warn | | release | CN01 | 11.32.87.19 | me.show.log.level+release.CN01=warn | | release | CN01 | 11.34.23.187 | me.show.log.level+release.CN01.11.34.23.187=verbose |

It enable us to apply different config to different servers.

Remark: User should use GroupID according to use scenarios.

2018.2


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.