Skip to content

Commit

Permalink
Use duration instead of int64
Browse files Browse the repository at this point in the history
Signed-off-by: zeroalphat <taichi-takemura@cybozu.co.jp>
  • Loading branch information
zeroalphat committed Sep 19, 2023
1 parent 44544e1 commit 0b37100
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 30 deletions.
2 changes: 1 addition & 1 deletion docs/necoperf-grpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| container_id | [string](#string) | | |
| timeout_seconds | [int64](#int64) | | |
| timeout | [google.protobuf.Duration](#google-protobuf-Duration) | | |



Expand Down
60 changes: 34 additions & 26 deletions pkg/rpc/necoperf.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions pkg/rpc/necoperf.proto
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
syntax = "proto3";
package necoperf;

option go_package = "pkg/rpc";
import "google/protobuf/duration.proto";

package necoperf;
option go_package = "github.com/cybozu-go/necoperf/pkg/rpc";

service NecoPerf {
rpc Profile(PerfProfileRequest) returns (stream PerfProfileResponse);
}

message PerfProfileRequest {
string container_id = 1;
int64 timeout_seconds = 2;
google.protobuf.Duration timeout = 2;
}

message PerfProfileResponse {
Expand Down

0 comments on commit 0b37100

Please sign in to comment.