dsrvlabs / vatz

Node management integration tools in purpose of maximizing node's uptime for any protocols
https://www.dsrvlabs.com/
GNU General Public License v3.0
30 stars 15 forks source link

Internal API service for VATZ #222

Closed rootwarp closed 2 years ago

rootwarp commented 2 years ago

Checklist

Please describe, what it's about or related Problem with

A clear description of what feature need to be developed or enhanced in Vatz

Providing API service to manage configs and provide query features for VATZ.

As I try to implement CLI subcommand(#220) for query plugin's status, I realized that we have several options to reach there.

Most easiest way to implement #220 is just reading internal status of HealthChecker which it will be possible after completing #221. But this way will limit Querying Plugin status feature available only for CLI subcommand. It is limited and can't be expandable.

For doing better, we can provide API service to control and query VATZ. And HTTP based service is one of the most general way to provide API nowadays.

At the beginning, I will define Protobuf for API services and implement it on top of gRPC service. Then I will attach gRPC Proxy to provide HTTP 1.1 connectivity.

relates #220, #221.

Describe the output that you are expecting for above

A clear and concise description of what you expect to happen.

New API service.

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

N/A

Additional context

Add any other context or screenshots about the feature request here.

rootwarp commented 2 years ago

@xellos00 Before proceed #220, we need to discuss this. Let me know your thought.

xellos00 commented 2 years ago

@rootwarp Let's Set up a meeting, for the right track. because I thought this might to time to create new APIs for sub commands that collaborated with our function cal as well. what time is good for you to have discuss?

rootwarp commented 2 years ago

@xellos00 Anytime on today.

xellos00 commented 2 years ago

@xellos00 Anytime on today.

@rootwarp I will give you ping for this on today.

xellos00 commented 2 years ago
 tree                                  
.
├── Makefile
├── README.md
├── cmd.go
├── cmd_test.go
├── cover.out
├── docs
│   ├── contributing.md
│   ├── design.md
│   ├── installation.md
│   └── workflow.md
├── go.mod
├── go.sum
├── main.go
├── api
│     ├── api.go (e.g)
|.    └── proxy.go (e.g)
├── manager
│   ├── api
│   │   ├── api.go
│   │   └── api_test.go
│   ├── config
│   │   ├── config.go
│   │   ├── config_test.go
│   │   └── fixtures.go
│   ├── dispatcher
│   │   ├── discord.go
│   │   ├── dispatcher.go
│   │   └── mock_Notification.go
│   ├── executor
│   │   ├── executor.go
│   │   ├── executor_test.go
│   │   ├── general_executor.go
│   │   └── mock_PluginClient.go
│   ├── healthcheck
│   │   ├── general_healthcheck.go
│   │   ├── healthcheck.go
│   │   └── healthcheck_test.go
│   └── types
│       ├── healthcheck.go
│       └── notification.go
├── mocks
│   └── mock_PluginClient.go
├── sdk
│   ├── Makefile
│   ├── README.md
│   ├── bootstrap
│   │   └── main.template
│   ├── go.mod
│   ├── go.sum
│   ├── grpc.go
│   ├── grpc_test.go
│   ├── log.go
│   ├── sdk.go
│   └── sdk_test.go
└── vatz