Skip to content

Latest commit

 

History

History
51 lines (33 loc) · 1.12 KB

README.md

File metadata and controls

51 lines (33 loc) · 1.12 KB

consulpp

This repo is forked from base repo to suit for our own project. I will commit PR to the base repo.

Header-only C++ consul client, based on Consul HTTP API.
Just have single head file.

Implemented

  • Register service
  • Deregister service
  • Set checks for service
  • Add/Modify KV store
  • Detele KV store
  • Get KV store
  • Health check

Requirements

C++ REST SDK

Build

Because we just have a single header file, so just need to build the test project.

Require compiler supports C++ 11.

Linux OR Windows

mkdir build
cd build
cmake -DBUILD_TEST=ON -DCPPREST_DIR=/path/to/cpprestsdk -DCPPREST_LIB=/path/tp/cpprestsdk_lib ../
make

Please use the debug libraray in debug runtime mode on Windows platform.

Usage

Refer to test.cpp.

TODO

  • Different check type (Now just have Script+Interval type, will add Script+Interval Script+Interval. Script+Interval)
  • Bug fix and more test.

Note

Some newer APIs may not support for now, if you are interesting about this project, welcome to commit PR.