| syntax = "proto3"; |
| |
| package phosphor.boottime; |
| |
| // This interface provides the gRPC access to boottime (Deoxys) service on gBMC. |
| // Reference: |
| // go/boot-event-logging-service, go/deoxys-enhancement-for-server3 |
| service BootTimeService { |
| // Send a checkpoint record. |
| rpc SetCheckpoint(SetCheckpointRequest) returns (SetCheckpointResponse) { |
| |
| } |
| // Indicate a reboot is completed. |
| // Reboot complete is unset when a checkpoint or duration is sent. |
| rpc RebootComplete(RebootCompleteRequest) returns (RebootCompleteResponse) { |
| |
| } |
| // Send a duration record. |
| rpc SetDuration(SetDurationRequest) returns (SetDurationResponse) { |
| |
| } |
| // Get RebootFlow (checkpoints), durations and stat. |
| rpc GetBootTime(GetBootTimeRequest) returns (GetBootTimeResponse) { |
| |
| } |
| } |
| |
| // SetCheckpoint |
| // When `timestamp_ms` is 0, the wall time is used. |
| // `duration_ms` is optional. |
| message SetCheckpointRequest { |
| string name = 1; |
| int64 timestamp_ms = 2; |
| int64 duration_ms = 3; |
| } |
| message SetCheckpointResponse {} |
| |
| // RebootComple (empty) |
| message RebootCompleteRequest {} |
| message RebootCompleteResponse {} |
| |
| // SetDuration |
| // `duration_ms` can be 0 or negative. |
| message SetDurationRequest { |
| string name = 1; |
| int64 duration_ms = 2; |
| } |
| message SetDurationResponse {} |
| |
| // GetBootTime |
| // The response structure mimics the Redfish service from |
| // go/boot-event-logging-service, with only raw data reported. Derived data like |
| // 'Breakdown' & 'PowerSource' are skipped. |
| message Duration { |
| string name = 1; |
| int64 duration_ms = 2; |
| } |
| message RebootFlow { |
| string stage = 1; |
| int64 timestamp_mono_ms = 2; |
| int64 timestamp_wall_ms = 3; |
| } |
| message Stat { |
| bool is_rebooting = 1; |
| } |
| message GetBootTimeRequest {} |
| message GetBootTimeResponse { |
| repeated Duration durations = 1; |
| repeated RebootFlow reboot_flow = 2; |
| Stat stat = 3; |
| } |