Last active
August 6, 2021 11:38
-
-
Save percybolmer/56ec5f86078b193a892346d47a31d40c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax = "proto3"; | |
package main; | |
option go_package=".;hardwaremonitoring"; | |
// HardwareStats is a struct containing information about the systems Memory usage and CPU | |
message HardwareStats { | |
int32 cpu = 1; | |
int32 memory_free = 2; | |
int32 memory_used = 3; | |
} | |
// EmptyRequest is a way to call gRPC functions without any input data | |
message EmptyRequest {} | |
// HardwareMonitor is our service, the service is the API, and rpc statements below will be methods that are available by the API | |
service HardwareMonitor{ | |
// Monitor will output stats about the hardware on the system host | |
rpc Monitor(EmptyRequest) returns (stream HardwareStats) {}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment