-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.go
27 lines (24 loc) · 1.1 KB
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package server
import "github.com/americanas-go/config"
const (
root = "ignite.grpc.server"
port = root + ".port"
maxConcurrentStreams = root + ".maxConcurrentStreams"
initialWindowSize = root + ".initialWindowSize"
initialConnWindowSize = root + ".initialConnWindowSize"
tlsEnabled = root + ".tls.enabled"
certFile = root + ".tls.certFile"
keyFile = root + ".tls.keyFile"
caFile = root + ".tls.caFile"
PluginsRoot = root + ".plugins"
)
func init() {
config.Add(port, 9090, "server grpc port")
config.Add(maxConcurrentStreams, 1024*1024*2, "server grpc max concurrent streams")
config.Add(initialWindowSize, 1024*1024*2, "sets the initial window size for a stream")
config.Add(initialConnWindowSize, 1024*1024*2, "sets the initial window size for a connection")
config.Add(tlsEnabled, false, "use TLS - required for HTTP2.")
config.Add(certFile, "", "path to the CRT/PEM file.")
config.Add(keyFile, "", "path to the private key file.")
config.Add(caFile, "", "path to the certificate authority (CA).")
}