Skip to content

Commit

Permalink
add feature flag service to proto file (open-telemetry#26)
Browse files Browse the repository at this point in the history
* add feature flag service to proto file

* update changelog for added feature flag service protos
  • Loading branch information
tsloughter authored May 20, 2022
1 parent 50da45b commit bb5f8bb
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ release.
demo](https://github.com/GoogleCloudPlatform/microservices-demo) with express
knowledge of the owners. The pre-existing copyrights will remain. Any
future significant modifications will be credited to OpenTelemetry Authors.
* Added feature flag service protos
([#26](https://github.com/open-telemetry/opentelemetry-demo-webstore/pull/26))
57 changes: 57 additions & 0 deletions pb/demo.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

syntax = "proto3";

import "google/protobuf/timestamp.proto";

package hipstershop;

option go_package = "genproto/hipstershop";
Expand Down Expand Up @@ -260,3 +262,58 @@ message Ad {
// short advertisement text to display.
string text = 2;
}

// ------------Feature flag service------------------

service FeatureFlagService {
rpc GetFlag(GetFlagRequest) returns (GetFlagResponse) {}
rpc CreateFlag(CreateFlagRequest) returns (CreateFlagResponse) {}
rpc UpdateFlag(UpdateFlagRequest) returns (UpdateFlagResponse) {}
rpc ListFlags(ListFlagsRequest) returns (ListFlagsResponse) {}
rpc DeleteFlag(DeleteFlagRequest) returns (DeleteFlagResponse) {}
}

message Flag {
string name = 1;
string description = 2;
bool enabled = 3;
google.protobuf.Timestamp created_at = 4;
google.protobuf.Timestamp updated_at = 5;
}

message GetFlagRequest {
string name = 1;
}

message GetFlagResponse {
Flag flag = 1;
}

message CreateFlagRequest {
string name = 1;
string description = 2;
bool enabled = 3;
}

message CreateFlagResponse {
Flag flag = 1;
}

message UpdateFlagRequest {
string name = 1;
bool enabled = 2;
}

message UpdateFlagResponse {}

message ListFlagsRequest {}

message ListFlagsResponse {
repated Flag flag = 1;
}

message DeleteFlagRequest {
string name = 1;
}

message DeleteFlagResponse {}

0 comments on commit bb5f8bb

Please sign in to comment.