talos/api/time/time.proto
Brad Beam ee24e42319 feat: Add time api to apid
This extends apid to cover the time api.

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-10-25 14:35:14 -07:00

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;
}