From 02945d277d1caa361ff9babe20653f98860f3778 Mon Sep 17 00:00:00 2001 From: James-Milligan Date: Wed, 28 Sep 2022 11:40:06 +0100 Subject: [PATCH 1/4] updated event type Signed-off-by: James-Milligan --- protobuf/schema/v1/schema.proto | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/protobuf/schema/v1/schema.proto b/protobuf/schema/v1/schema.proto index 3e411d8..09b0c3d 100644 --- a/protobuf/schema/v1/schema.proto +++ b/protobuf/schema/v1/schema.proto @@ -6,6 +6,7 @@ option go_package = "schema/service/v1"; option java_package = "dev.openfeature.flagd.grpc"; import "google/protobuf/struct.proto"; +import "google/protobuf/empty.proto"; message ResolveBooleanRequest { string flag_key = 1; @@ -57,10 +58,15 @@ message ResolveObjectResponse { string variant = 3; } +message EventStreamResponse { + string type = 1; +} + service Service { rpc ResolveBoolean(ResolveBooleanRequest) returns (ResolveBooleanResponse) {} rpc ResolveString(ResolveStringRequest) returns (ResolveStringResponse) {} rpc ResolveFloat(ResolveFloatRequest) returns (ResolveFloatResponse) {} rpc ResolveInt(ResolveIntRequest) returns (ResolveIntResponse) {} rpc ResolveObject(ResolveObjectRequest) returns (ResolveObjectResponse) {} + rpc EventStream(google.protobuf.Empty) returns (stream EventStreamResponse) {} } From 9209fef9ad86c9d534174972b5a89d1a54caae6f Mon Sep 17 00:00:00 2001 From: jamesmilligan Date: Thu, 20 Oct 2022 12:31:53 +0100 Subject: [PATCH 2/4] added readme Signed-off-by: jamesmilligan --- protobuf/buf.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 protobuf/buf.md diff --git a/protobuf/buf.md b/protobuf/buf.md new file mode 100644 index 0000000..5e46cbb --- /dev/null +++ b/protobuf/buf.md @@ -0,0 +1,19 @@ +# Flagd build spec + +## This repository is managed by OpenFeature + + +This module contains the core types that developers can use for interacting with [flagd](https://github.com/open-feature/flagd). + +Internally flagd uses the connect protocol, meaning it is compatible with grpc interfaces. If your desired language has a supported plugin for generating connect stubs then it is reccomended to use these over grpc. + +The package contains a single `Service`, describing the 5 core `rpcs` for feature flag evaluation (`ResolveBoolean`, `ResolveString`, `ResolveFloat`, `ResolveInt` and `ResolveObject`) each with their type specific requests and responses (`ResolveXXXRequest` and `ResolveXXXResponse`). +The final `rpc` on the `Service` is a streamed response called `EventStream`, this is used to pass internal events to the client, such as `configuration_change` or `provider_ready`. + +## Build options + +The core definitions are in the `schema.v1` package, and contains package name options for the following languages, as a result these can be excluded from build instructions: + +- Go: schema/service/v1 +- Java: dev.openfeature.flagd.grpc +- C#: OpenFeature.Flagd.Grpc From fa3fbfcdd92f7e1420edc289c0479a1a1f430628 Mon Sep 17 00:00:00 2001 From: jamesmilligan Date: Thu, 20 Oct 2022 12:44:38 +0100 Subject: [PATCH 3/4] language updates Signed-off-by: jamesmilligan --- protobuf/buf.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/protobuf/buf.md b/protobuf/buf.md index 5e46cbb..1acf38f 100644 --- a/protobuf/buf.md +++ b/protobuf/buf.md @@ -7,12 +7,12 @@ This module contains the core types that developers can use for interacting with Internally flagd uses the connect protocol, meaning it is compatible with grpc interfaces. If your desired language has a supported plugin for generating connect stubs then it is reccomended to use these over grpc. -The package contains a single `Service`, describing the 5 core `rpcs` for feature flag evaluation (`ResolveBoolean`, `ResolveString`, `ResolveFloat`, `ResolveInt` and `ResolveObject`) each with their type specific requests and responses (`ResolveXXXRequest` and `ResolveXXXResponse`). -The final `rpc` on the `Service` is a streamed response called `EventStream`, this is used to pass internal events to the client, such as `configuration_change` or `provider_ready`. +The package contains a single `Service`, describing the 5 core `rpcs` for feature flag evaluation (`ResolveBoolean`, `ResolveString`, `ResolveFloat`, `ResolveInt` and `ResolveObject`) each with their type specific request and response objects(`ResolveXXXRequest` and `ResolveXXXResponse`). +The final `rpc` on the `Service` is a streamed response named `EventStream`, this is used to pass internal events to the client, such as `configuration_change` and `provider_ready`. ## Build options -The core definitions are in the `schema.v1` package, and contains package name options for the following languages, as a result these can be excluded from build instructions: +The core definitions are in the `schema.v1` package, and contains package name options for the following languages, as such these options may be excluded from build instructions: - Go: schema/service/v1 - Java: dev.openfeature.flagd.grpc From 31b6761347c7cb81a592e5160dd3f28b3338d5d2 Mon Sep 17 00:00:00 2001 From: James Milligan <75740990+james-milligan@users.noreply.github.com> Date: Thu, 20 Oct 2022 18:46:15 +0100 Subject: [PATCH 4/4] Update protobuf/buf.md Co-authored-by: Todd Baert Signed-off-by: James Milligan <75740990+james-milligan@users.noreply.github.com> --- protobuf/buf.md | 1 - 1 file changed, 1 deletion(-) diff --git a/protobuf/buf.md b/protobuf/buf.md index 1acf38f..eada32e 100644 --- a/protobuf/buf.md +++ b/protobuf/buf.md @@ -2,7 +2,6 @@ ## This repository is managed by OpenFeature - This module contains the core types that developers can use for interacting with [flagd](https://github.com/open-feature/flagd). Internally flagd uses the connect protocol, meaning it is compatible with grpc interfaces. If your desired language has a supported plugin for generating connect stubs then it is reccomended to use these over grpc.