Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flag & toml config for gRPC server #6933

Merged
merged 10 commits into from
Aug 5, 2020
2 changes: 1 addition & 1 deletion server/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func DefaultConfig() *Config {
RPCMaxBodyBytes: 1000000,
},
GRPC: GRPCConfig{
Enable: false,
Enable: true,
amaury1093 marked this conversation as resolved.
Show resolved Hide resolved
Address: "0.0.0.0:9090",
},
}
Expand Down
12 changes: 12 additions & 0 deletions server/config/toml.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,18 @@ rpc-max-body-bytes = {{ .API.RPCMaxBodyBytes }}

# EnableUnsafeCORS defines if CORS should be enabled (unsafe - use it at your own risk)
enabled-unsafe-cors = {{ .API.EnableUnsafeCORS }}

###############################################################################
### GRPC Configuration ###
###############################################################################

[grpc]

# Enable defines if the API server should be enabled.
enable = {{ .GRPC.Enable }}

# Address defines the API server to listen on
address = "{{ .GRPC.Address }}"
`

var configTemplate *template.Template
Expand Down