/Mao_Service_Discovery

Discover your services by using gRPC stream, ICMP or etcd. Come with WebGUI, Restful API and Config Persistence ability.

Primary LanguageGoApache License 2.0Apache-2.0

Mao Service Discovery

Category Job
Build Go (Linux/Win/MacOS) Go Static (Linux/Win/MacOS) vue3 Node.js
Test CodeQL Docker Image CI
Analyze Analyze Dependency Relationships Map
Binary Release Node.js Package Publish (Commit) (Linux) Node.js Package Publish (Commit) (Raspberry-Pi-arm) Node.js Package Publish (Commit) (Windows) Docker Image Publish
Binary Link Github Docker Image = NPM official = Taobao & Alibaba Cloud mirror

Build

Method 1: Compile and link statically, and build WebUI 2.0

./build_all.sh

Method 2: Compile and link statically

./statically_linked_compilation.sh

Method 3: Build WebUI 2.0

./build_webui.sh

Run

Example 1: Run client

./MaoServerDiscovery client --report_server_addr 2001:db8::1 --silent --log_level WARN

Example 2: Run server

In order to open the ICMP listening socket, you need CAP_NET_RAW capability from setcap / root account / sudo to run this command.

$ sudo setcap CAP_NET_RAW+eip ./MaoServerDiscovery
$ getcap ./MaoServerDiscovery
  [output] ./MaoServerDiscovery cap_net_raw=eip
./MaoServerDiscovery server --report_server_addr :: --silent --log_level WARN \
    --influxdb_url https://xxxxxx.maojianwei.com:12345 --influxdb_org_bucket xxxxxx --influxdb_token xxxxxx==

client_help_example.png

server_help_example.png

Web UI 2.0

WebUI_1.png

WebUI_1_1.png

WebUI_2.png

WebUI_3.png

Software Architecture

Please refer to MODULES.md file.

Todo List

Please refer to the agile board.

Initial need

Discover your service by two methods:

  1. Client-Server mode, using gRPC stream.
  2. Server-only mode, using ICMP.
  3. Using etcd.

Product: Client-Server mode, using gRPC stream.

1. REST API (JSON format)

2-json-format.png

2. Web Monitor

2-readable-format.png

3. CLI Output

2-cli-output.png

4. CLI Parameters

2-cli-parameters.png

Demo 1: Client-Server mode, using gRPC stream.

Client-Server mode, using gRPC stream. 1

Client-Server mode, using gRPC stream. 2

client-server-mode-production.png

Demo 2: Using etcd.

Using etcd.

Architect

Jianwei Mao

https://www.MaoJianwei.com/

E-mail: maojianwei2012@126.com

.

JetBrains Logo Supported by JetBrains IDEA Open Source License 2020-2023.