Files
compute-blade-agent/api/bladeapi/v1alpha1/blade.proto
Cedric Kienzler 062e36e33a feat(bladectl): add server version information to output (#100)
add server version information to output
ensure the blade-name is always set

---------

Co-authored-by: Cedric Kienzler <cedric@specht-labs.de>
2025-06-06 22:14:29 +00:00

86 lines
2.0 KiB
Protocol Buffer

syntax = "proto3";
import "google/protobuf/empty.proto";
package api.bladeapi.v1alpha1;
option go_package = "github.com/uptime-induestries/compute-blade-agent/api/blade/v1alpha1;bladeapiv1alpha1";
// Event is an event the agent reacts to
enum Event {
IDENTIFY = 0;
IDENTIFY_CONFIRM = 1;
CRITICAL = 2;
CRITICAL_RESET = 3;
}
// FanUnit defines the fan unit detected by the blade
enum FanUnit {
DEFAULT = 0;
SMART = 1;
}
// PowerStatus defines the power status of the blade
enum PowerStatus {
POE_OR_USBC = 0;
POE_802_AT = 1;
}
message StealthModeRequest {
bool enable = 1;
}
message SetFanSpeedRequest {
int64 percent = 1;
}
message EmitEventRequest {
Event event = 1;
}
message FanCurveStep {
int64 temperature = 1;
uint32 percent = 2;
}
message VersionInfo {
string version = 1;
string commit = 2;
int64 date = 3;
}
message StatusResponse {
bool stealth_mode = 1;
bool identify_active = 2;
bool critical_active = 3;
int64 temperature = 4;
int64 fan_rpm = 5;
PowerStatus power_status = 6;
uint32 fan_percent = 7;
bool fan_speed_automatic = 8;
int64 critical_temperature_threshold = 9;
repeated FanCurveStep fan_curve_steps = 10;
VersionInfo version = 11;
}
service BladeAgentService {
// EmitEvent emits an event to the blade
rpc EmitEvent(EmitEventRequest) returns (google.protobuf.Empty) {}
// WaitForIdentifyConfirm blocks until the blades button is pressed
rpc WaitForIdentifyConfirm(google.protobuf.Empty) returns (google.protobuf.Empty) {}
// Sets the fan speed to a specific value.
rpc SetFanSpeed(SetFanSpeedRequest) returns (google.protobuf.Empty) {}
// Sets the fan speed to automatic mode.
//
// Internally, this is equivalent to calling SetFanSpeed with a nil/empty value.
rpc SetFanSpeedAuto(google.protobuf.Empty) returns (google.protobuf.Empty) {}
// Sets the blade to stealth mode (disables all LEDs)
rpc SetStealthMode(StealthModeRequest) returns (google.protobuf.Empty) {}
// Gets the current status of the blade
rpc GetStatus(google.protobuf.Empty) returns (StatusResponse) {}
}