mirror of
https://github.com/siderolabs/talos.git
synced 2025-08-19 21:51:12 +02:00
This extends apid to cover the time api. Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
34 lines
871 B
Protocol Buffer
34 lines
871 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package time;
|
|
|
|
option go_package = "github.com/talos-systems/talos/api/time";
|
|
option java_multiple_files = true;
|
|
option java_outer_classname = "TimeApi";
|
|
option java_package = "com.time.api";
|
|
|
|
import "google/protobuf/empty.proto";
|
|
import "google/protobuf/timestamp.proto";
|
|
import "common/common.proto";
|
|
|
|
// The time service definition.
|
|
service Time {
|
|
rpc Time(google.protobuf.Empty) returns (TimeReply);
|
|
rpc TimeCheck(TimeRequest) returns (TimeReply);
|
|
}
|
|
|
|
// The response message containing the ntp server
|
|
message TimeRequest { string server = 1; }
|
|
|
|
// The response message containing the ntp server, time, and offset
|
|
message TimeReply {
|
|
repeated TimeResponse response = 1;
|
|
}
|
|
|
|
message TimeResponse {
|
|
common.NodeMetadata metadata = 1;
|
|
string server = 2;
|
|
google.protobuf.Timestamp localtime = 3;
|
|
google.protobuf.Timestamp remotetime = 4;
|
|
}
|