feat: some grpc collectors #1
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new project,
manifest-node-exporter, which serves as a Prometheus metrics exporter for the Manifest Network node. It includes the addition of core functionality, command-line interface (CLI) commands, gRPC client integration, and licensing. Below is a summary of the most important changes grouped by theme.Project Setup and Licensing:
Apache License 2.0to the project, defining terms for use, reproduction, and distribution of the code. (LICENSE, LICENSER1-R201)go.mod. (go.mod, go.modR1-R44)CLI Commands:
rootcommand incmd/root.go, which initializes the CLI, sets up logging, and binds configuration flags usingviper. (cmd/root.go, cmd/root.goR1-R84)servecommand incmd/serve.go, which starts a Prometheus metrics server, integrates gRPC-based collectors, and supports graceful shutdown on signals. (cmd/serve.go, cmd/serve.goR1-R142)gRPC Client and Collectors:
GRPCClientinpkg/client/grpc_client.gofor establishing and managing gRPC connections with support for TLS and keepalive parameters. (pkg/client/grpc_client.go, pkg/client/grpc_client.goR1-R52)pkg/collectors/grpc/common.gofor validating gRPC clients and reporting Prometheus metrics. (pkg/collectors/grpc/common.go, pkg/collectors/grpc/common.goR1-R43)Entry Point:
main.goto execute the CLI commands. (main.go, main.goR1-R7)