gcsc configuration management platform client
Introduction
gcsc (go config server client) configuration management platform client, project-based development framework gf, mainly for configuration management platform ( to achieve client https://github.com/goflyfox/gcs) project;
- github Address: https://github.com/goflyfox/gcsc
- gitee Address: https://gitee.com/goflyfox/gcsc
Installation Tutorial
- gopath mode:
go get github.com/goflyfox/gcsc
- Or add the use of go.mod:
require github.com/goflyfox/gcsc latest
functional module
- Configuration management platform client implementations, only use load initialization can go mod references.
- Implement the client-side dynamic loading service published data, the client need not perceive automatically updated.
- Call the method is simple to use, equal to the local call.
- Support local cache parameters frequent calls without performance bottlenecks.
- Support restart the local load, then the server does not affect the availability of the client in exceptional circumstances.
- Support multi-project by project configuration is loaded and configured to acquire, easy configuration and maintenance.
Instructions for use
- This project configuration management platform ( client https://github.com/goflyfox/gcs) project implementation
- We need to configure the server address configuration management platform, project name, and a secret key storage address;
[config] # Server address server-url = "http://127.0.0.1" # Project name, supports multiple projects, separated by commas project-name = "test" Item # keys, corresponding to the item name project-secret = "12345678" # Data storage location for the boot loader to avoid data loss data-path = "data"
- Start initialization is required;
_ "github.com/goflyfox/gcsc/task"
- You can get a direct call to the configuration data management platform, use the following example:
// management platform may be configured to obtain a value corresponding to test client.Value("test")
thank
- gf framework https://github.com/gogf/gf