Skip to content

Commit

Permalink
docs: service_config.md: fix pb syntax, add highlighting
Browse files Browse the repository at this point in the history
1. Protobuf doesn't support `//` comments, only `#`
2. Add syntax highlighting
  • Loading branch information
sergiitk authored Dec 6, 2023
1 parent 8c37846 commit e17a9ef
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions doc/service_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ DNS](https://github.com/grpc/proposal/blob/master/A2-service-configs-in-dns.md).

Here is an example service config in protobuf form:

```
```textproto
{
// Use round_robin LB policy.
# Use round_robin LB policy.
load_balancing_config: { round_robin: {} }
// This method config applies to method "foo/bar" and to all methods
// of service "baz".
# This method config applies to method "foo/bar" and to all methods
# of service "baz".
method_config: {
name: {
service: "foo"
Expand All @@ -76,7 +76,7 @@ Here is an example service config in protobuf form:
name: {
service: "baz"
}
// Default timeout for matching methods.
# Default timeout for matching methods.
timeout: {
seconds: 1
nanos: 1
Expand All @@ -87,7 +87,7 @@ Here is an example service config in protobuf form:

Here is the same example service config in JSON form:

```
```json
{
"loadBalancingConfig": [ { "round_robin": {} } ],
"methodConfig": [
Expand Down

0 comments on commit e17a9ef

Please sign in to comment.