talos/api/time/api.proto
Andrew Rynhard 6efd6fbe08 chore: move gRPC API to public
In order for other projects to make use of our APIs, they must not
reside underneath the internal directory. This moves the protobuf
definitions to a top-level "api" directory and scopes them according to
their domain. This change also removes generated code from the gitignore
file so that users don't have to generate the code themseleves.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-09-19 08:55:13 -07:00

30 lines
708 B
Protocol Buffer

syntax = "proto3";
package proto;
option go_package = "proto";
option java_multiple_files = true;
option java_outer_classname = "ApiProto";
option java_package = "com.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;
}