mirror of
https://github.com/siderolabs/talos.git
synced 2025-10-17 10:31:19 +02:00
Part of the API refactor; this introduces a gRPC server for ntp. This allows the ability to query node time and check time against specific ntp servers. This refactor also moves the ntp functionality into a sub package for better project organization. Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
25 lines
569 B
Protocol Buffer
25 lines
569 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package proto;
|
|
|
|
import "google/protobuf/empty.proto";
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
// The Init service definition.
|
|
service Ntpd {
|
|
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 {
|
|
string server = 1;
|
|
google.protobuf.Timestamp localtime = 2;
|
|
google.protobuf.Timestamp remotetime = 3;
|
|
}
|