ing
This commit is contained in:
parent
e17aceb743
commit
9ea3676888
|
@ -1,5 +0,0 @@
|
|||
package config
|
||||
|
||||
type Auth struct {
|
||||
SigningKey string `json:"signingKey" yaml:"signingKey" toml:"signingKey"`
|
||||
}
|
|
@ -1,12 +1,16 @@
|
|||
package config
|
||||
|
||||
import (
|
||||
oosc "git.loafle.net/overflow/overflow_server_config"
|
||||
)
|
||||
|
||||
var Config GatewayConfig
|
||||
|
||||
type GatewayConfig struct {
|
||||
Server *Server `json:"server" yaml:"server" toml:"server"`
|
||||
Auth *Auth `json:"auth" yaml:"auth" toml:"auth"`
|
||||
Websocket *Websocket `json:"websocket" yaml:"websocket" toml:"websocket"`
|
||||
GRPC *GRPC `json:"gRPC" yaml:"gRPC" toml:"gRPC"`
|
||||
Redis *Redis `json:"redis" yaml:"redis" toml:"redis"`
|
||||
Servlets map[string]*Servlet `json:"servlets" yaml:"servlets" toml:"servlets"`
|
||||
Server *oosc.Server `json:"server" yaml:"server" toml:"server"`
|
||||
Auth *oosc.Auth `json:"auth" yaml:"auth" toml:"auth"`
|
||||
Websocket *oosc.Websocket `json:"websocket" yaml:"websocket" toml:"websocket"`
|
||||
GRPC *oosc.GRPC `json:"gRPC" yaml:"gRPC" toml:"gRPC"`
|
||||
Redis *oosc.Redis `json:"redis" yaml:"redis" toml:"redis"`
|
||||
Servlets map[string]*oosc.Servlet `json:"servlets" yaml:"servlets" toml:"servlets"`
|
||||
}
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
package config
|
||||
|
||||
type GRPC struct {
|
||||
Server
|
||||
Pool *Pool `json:"pool" yaml:"pool" toml:"pool"`
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
package config
|
||||
|
||||
import "time"
|
||||
|
||||
type Pool struct {
|
||||
MaxCapacity int `json:"maxCapacity" yaml:"maxCapacity" toml:"maxCapacity"`
|
||||
MaxIdle int `json:"maxIdle" yaml:"maxIdle" toml:"maxIdle"`
|
||||
IdleTimeout time.Duration `json:"idleTimeout" yaml:"idleTimeout" toml:"idleTimeout"`
|
||||
Wait bool `json:"wait" yaml:"wait" toml:"wait"`
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
package config
|
||||
|
||||
type Redis struct {
|
||||
Server
|
||||
Pool *Pool `json:"pool" yaml:"pool" toml:"pool"`
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
package config
|
||||
|
||||
import "time"
|
||||
|
||||
type Server struct {
|
||||
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"`
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
package config
|
||||
|
||||
type Servlet struct {
|
||||
Entry string `json:"entry" yaml:"entry" toml:"entry"`
|
||||
Socket *Socket `json:"socket" yaml:"socket" toml:"socket"`
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
package config
|
||||
|
||||
import "time"
|
||||
|
||||
type Socket struct {
|
||||
MaxMessageSize int64 `json:"maxMessageSize" yaml:"maxMessageSize" toml:"maxMessageSize"`
|
||||
WriteTimeout time.Duration `json:"writeTimeout" yaml:"writeTimeout" toml:"writeTimeout"`
|
||||
ReadTimeout time.Duration `json:"readTimeout" yaml:"readTimeout" toml:"readTimeout"`
|
||||
PongTimeout time.Duration `json:"pongTimeout" yaml:"pongTimeout" toml:"pongTimeout"`
|
||||
PingTimeout time.Duration `json:"pingTimeout" yaml:"pingTimeout" toml:"pingTimeout"`
|
||||
PingPeriod time.Duration `json:"pingPeriod" yaml:"pingPeriod" toml:"pingPeriod"`
|
||||
BinaryMessage bool `json:"binaryMessage" yaml:"binaryMessage" toml:"binaryMessage"`
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
package config
|
||||
|
||||
import "time"
|
||||
|
||||
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"`
|
||||
EnableCompression bool `json:"enableCompression" yaml:"enableCompression" toml:"enableCompression"`
|
||||
}
|
|
@ -12,3 +12,4 @@ import:
|
|||
- package: google.golang.org/grpc
|
||||
- package: github.com/valyala/fasthttp
|
||||
version: v20160617
|
||||
- package: git.loafle.net/overflow/overflow_server_config
|
||||
|
|
Loading…
Reference in New Issue
Block a user