Skip to content

OpenArkStudio/consulpp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Releases

No releases published

Packages

No packages published

Languages

  • C++ 95.0%
  • CMake 5.0%