This commit is contained in:
crusader 2017-11-09 19:56:11 +09:00
parent 4feaf38bb4
commit 7ef5ec9e3f
2 changed files with 10 additions and 3 deletions

View File

@ -1,7 +1,12 @@
package config
import "time"
type Server struct {
Network string `json:"network" yaml:"network" toml:"network"`
Addr string `json:"addr" yaml:"addr" toml:"addr"`
TLS bool `json:"tls" yaml:"tls" toml:"tls"`
Name string `json:"name" yaml:"name" toml:"name"`
Network string `json:"network" yaml:"network" toml:"network"`
Addr string `json:"addr" yaml:"addr" toml:"addr"`
TLS bool `json:"tls" yaml:"tls" toml:"tls"`
Concurrency int `json:"concurrency" yaml:"concurrency" toml:"concurrency"`
MaxStopWaitTime time.Duration `json:"maxStopWaitTime" yaml:"maxStopWaitTime" toml:"maxStopWaitTime"`
}

View File

@ -6,5 +6,7 @@ type Websocket struct {
HandshakeTimeout time.Duration `json:"handshakeTimeout" yaml:"handshakeTimeout" toml:"handshakeTimeout"`
ReadBufferSize int `json:"readBufferSize" yaml:"readBufferSize" toml:"readBufferSize"`
WriteBufferSize int `json:"writeBufferSize" yaml:"writeBufferSize" toml:"writeBufferSize"`
ReadTimeout time.Duration `json:"readTimeout" yaml:"readTimeout" toml:"readTimeout"`
WriteTimeout time.Duration `json:"writeTimeout" yaml:"writeTimeout" toml:"writeTimeout"`
EnableCompression bool `json:"enableCompression" yaml:"enableCompression" toml:"enableCompression"`
}