Skip to content

enbool/xing-lake

Repository files navigation

xing-lake

1. Introduction

This project is a config center that created by Golang

2. Features

  • Support multi data source
  • Support multi data type
  • Support multi data format
  • Support multi data storage
  • Support multi data sync

3. Quick Start

3.1 Install

go get -u https://github.com/enbool/xing-lake

Install Goland dependencies

Install Rust dependencies

Install Docker

#### Docker
Starter Repository for Docker: https://github.com/enbool/xing-lake/lake
Run Script:
```shell
docker run -d -p 8080:8080 --name xing-lake enbool/xing-lake
### 3.2 Usage
#### 3.2.1 Create a config center
```go
ConfigServer := xing_lake.NewConfigServer()

3.2.2 Add a data source

ConfigServer.AddDataSource("mysql", "mysql://root:123456@localhost:3306/xing_lake")

3.2.3 Add a data type

ConfigServer.AddDataType("json", "json")

3.2.4 Add a data format

ConfigServer.AddDataFormat("json", "json")

3.2.5 Create a config client

ConfigClient := xing_lake.NewConfigClient()

3.2.5 Connect to the config center

ConfigClient.Connect("http://localhost:8080")

3.2.6 Get a config

ConfigClient.GetConfig("mysql", "json", "json")

3.2.7 Set a config

ConfigClient.SetConfig("mysql", "json", "json", "{'name':'xing-lake'}")

3.2.8 Delete a config

ConfigClient.DeleteConfig("mysql", "json", "json")

4. Contributing

We encourage you to contribute to xing-lake! Please check out the [Contributing to xing-lake guide #TODO]

5. License

xing-lake is under the Apache License, Version 2.0

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages