Categorygithub.com/huaweicloud/devcloud-go
module
1.0.3
Repository: https://github.com/huaweicloud/devcloud-go.git
Documentation: pkg.go.dev

# README

Devcloud-go

Devcloud-go provides a sql-driver for mysql, a redis client and a kafka consumer which named dms, you can use the driver and redis client with MAS or use them separately, at the same time, they also support use cases with injection faults for scenario simulation. The driver is developed based on go-sql-driver/mysql v1.6.0, the redis client is developed based on go-redis v8.11.3. The kafka consumer is developed based on github.com/Shopify/sarama v1.29.1. The mock package provides the simulation of MySQL, redis and etcd services, and realizes the fault injection function of MySQL and redis through TCP. This document introduces how to obtain and use Devcloud-go.

Requirements

  • To use devcloud-go multi datasource disaster recovery capability, you need to create an MAS application in huaweicloud.
  • Devcloud-go requires go 1.14.6 or later, run command go version to check the version of Go.

Install

Run the following command to install Devcloud-go:

go get github.com/huaweicloud/devcloud-go

Code Example

ChangeLog

Detailed changes for each released version are documented in the CHANGELOG.md.

License

This project is under the Apache 2.0 license. See the LICENSE file for details.

# Packages

No description provided by the author
Package dms implements a kafka consumer based on sarama, user can consume messages asynchronous or synchronous with dms, and ensure message not lost.
Package mas contains mas properties configuration.
Package mock introduce three mock methods for interface, mysql and redis.
Package redis defines DevsporeClient which implements all redis commands in https://github.com/go-redis/redis/blob/master/commands.go and it provides read-write separation and etcd multi-data source disaster tolerance switching capabilities, user can create a DevsporeClient by yaml configuration file or by code, see details in README.md.
No description provided by the author
No description provided by the author