|
|
@ -18,7 +18,7 @@ type (
|
|
|
|
PrivateKeys []PrivateKeyConf
|
|
|
|
PrivateKeys []PrivateKeyConf
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// why not name it as Conf, because we need to consider usage like:
|
|
|
|
// Why not name it as Conf, because we need to consider usage like:
|
|
|
|
// type Config struct {
|
|
|
|
// type Config struct {
|
|
|
|
// zrpc.RpcConf
|
|
|
|
// zrpc.RpcConf
|
|
|
|
// rest.RestConf
|
|
|
|
// rest.RestConf
|
|
|
@ -28,9 +28,11 @@ type (
|
|
|
|
service.ServiceConf
|
|
|
|
service.ServiceConf
|
|
|
|
Host string `json:",default=0.0.0.0"`
|
|
|
|
Host string `json:",default=0.0.0.0"`
|
|
|
|
Port int
|
|
|
|
Port int
|
|
|
|
Verbose bool `json:",optional"`
|
|
|
|
CertFile string `json:",optional"`
|
|
|
|
MaxConns int `json:",default=10000"`
|
|
|
|
KeyFile string `json:",optional"`
|
|
|
|
MaxBytes int64 `json:",default=1048576,range=[0:8388608]"`
|
|
|
|
Verbose bool `json:",optional"`
|
|
|
|
|
|
|
|
MaxConns int `json:",default=10000"`
|
|
|
|
|
|
|
|
MaxBytes int64 `json:",default=1048576,range=[0:8388608]"`
|
|
|
|
// milliseconds
|
|
|
|
// milliseconds
|
|
|
|
Timeout int64 `json:",default=3000"`
|
|
|
|
Timeout int64 `json:",default=3000"`
|
|
|
|
CpuThreshold int64 `json:",default=900,range=[0:1000]"`
|
|
|
|
CpuThreshold int64 `json:",default=900,range=[0:1000]"`
|
|
|
|