Skip to content

Commit bb5f8bb

Browse files
authored
add feature flag service to proto file (open-telemetry#26)
* add feature flag service to proto file * update changelog for added feature flag service protos
1 parent 50da45b commit bb5f8bb

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ release.
1313
demo](https://github.com/GoogleCloudPlatform/microservices-demo) with express
1414
knowledge of the owners. The pre-existing copyrights will remain. Any
1515
future significant modifications will be credited to OpenTelemetry Authors.
16+
* Added feature flag service protos
17+
([#26](https://github.com/open-telemetry/opentelemetry-demo-webstore/pull/26))

pb/demo.proto

+57
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
syntax = "proto3";
1616

17+
import "google/protobuf/timestamp.proto";
18+
1719
package hipstershop;
1820

1921
option go_package = "genproto/hipstershop";
@@ -260,3 +262,58 @@ message Ad {
260262
// short advertisement text to display.
261263
string text = 2;
262264
}
265+
266+
// ------------Feature flag service------------------
267+
268+
service FeatureFlagService {
269+
rpc GetFlag(GetFlagRequest) returns (GetFlagResponse) {}
270+
rpc CreateFlag(CreateFlagRequest) returns (CreateFlagResponse) {}
271+
rpc UpdateFlag(UpdateFlagRequest) returns (UpdateFlagResponse) {}
272+
rpc ListFlags(ListFlagsRequest) returns (ListFlagsResponse) {}
273+
rpc DeleteFlag(DeleteFlagRequest) returns (DeleteFlagResponse) {}
274+
}
275+
276+
message Flag {
277+
string name = 1;
278+
string description = 2;
279+
bool enabled = 3;
280+
google.protobuf.Timestamp created_at = 4;
281+
google.protobuf.Timestamp updated_at = 5;
282+
}
283+
284+
message GetFlagRequest {
285+
string name = 1;
286+
}
287+
288+
message GetFlagResponse {
289+
Flag flag = 1;
290+
}
291+
292+
message CreateFlagRequest {
293+
string name = 1;
294+
string description = 2;
295+
bool enabled = 3;
296+
}
297+
298+
message CreateFlagResponse {
299+
Flag flag = 1;
300+
}
301+
302+
message UpdateFlagRequest {
303+
string name = 1;
304+
bool enabled = 2;
305+
}
306+
307+
message UpdateFlagResponse {}
308+
309+
message ListFlagsRequest {}
310+
311+
message ListFlagsResponse {
312+
repated Flag flag = 1;
313+
}
314+
315+
message DeleteFlagRequest {
316+
string name = 1;
317+
}
318+
319+
message DeleteFlagResponse {}

0 commit comments

Comments
 (0)