-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
1,668 additions
and
2,396 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
sidebar_position: 4 | ||
--- | ||
|
||
# Reflection (UI) | ||
|
||
:::info | ||
This feature available since `v0.2.0` | ||
::: | ||
|
||
The protoconf server supports gRPC reflection to auto-generate UI for configurations. To allow reflection for your config struct, simply define a `service` containing a `rpc` method definition with your config struct as the input message `protoconf.v1.ConfigMutationResponse` as the result message. | ||
|
||
```protobuf title="src/myproject/server_config.proto" showLineNumbers | ||
syntax = "proto3"; | ||
import "google/protobuf/duration.proto"; | ||
// highlight-next-line | ||
import "protoconf/v1/protoconf.proto"; | ||
package myproject.v1; | ||
message ServerConfiguration { | ||
bool is_debug = 1; | ||
uint32 max_connections = 2; | ||
float max_payload_size_mb = 3; | ||
google.protobuf.Duration request_timeout = 4; | ||
} | ||
// highlight-start | ||
service ServerConfigurationService { | ||
rpc Set(ServerConfiguration) returns (protoconf.v1.ConfigMutationResponse); | ||
} | ||
// highlight-end | ||
``` | ||
|
||
Then run the protoconf server (`protoconf serve .`) or (`protoconf devserver .`) and go to http://localhost:4300. | ||
|
||
Use the request `metadata` to define the mutation `path`. | ||
|
||
 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react'; | ||
import Line from '@theme-original/CodeBlock/Line'; | ||
|
||
export default function LineWrapper(props) { | ||
return ( | ||
<> | ||
<Line {...props} /> | ||
</> | ||
); | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[ | ||
"0.1.7" | ||
] |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.