Skip to content

Commit

Permalink
chore: add GET /api/status page
Browse files Browse the repository at this point in the history
  • Loading branch information
moul committed Nov 26, 2019
1 parent af0efeb commit 496a45f
Show file tree
Hide file tree
Showing 5 changed files with 558 additions and 36 deletions.
8 changes: 8 additions & 0 deletions api/dvserver.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ service DepvizService {
rpc Graph(Graph.Input) returns (Graph.Output) { option (google.api.http) = {get: "/graph"}; };
rpc StoreDump(StoreDump.Input) returns (StoreDump.Output) { option (google.api.http) = {get: "/store/dump"}; };
rpc Ping(Ping.Input) returns (Ping.Output) { option (google.api.http) = {get: "/ping"}; };
rpc Status(Status.Input) returns (Status.Output) { option (google.api.http) = {get: "/status"}; };
}

message Graph {
Expand Down Expand Up @@ -44,4 +45,11 @@ message Ping {
message Output {
string message = 1;
}
}

message Status {
message Input {}
message Output {
bool everything_is_ok = 1 [(gogoproto.customname) = "EverythingIsOK"];
}
}
2 changes: 1 addition & 1 deletion gen.sum

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

4 changes: 4 additions & 0 deletions internal/dvserver/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,7 @@ func (s *service) StoreDump(ctx context.Context, in *StoreDump_Input) (*StoreDum
func (s *service) Ping(context.Context, *Ping_Input) (*Ping_Output, error) {
return &Ping_Output{Message: "pong"}, nil
}

func (s *service) Status(context.Context, *Status_Input) (*Status_Output, error) {
return &Status_Output{EverythingIsOK: true}, nil
}
Loading

0 comments on commit 496a45f

Please sign in to comment.