ing
This commit is contained in:
		
							parent
							
								
									530a422ab7
								
							
						
					
					
						commit
						750524f29c
					
				| @ -13,7 +13,7 @@ type Connector interface { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| type Connectors struct { | type Connectors struct { | ||||||
| 	Name string `json:"name"` | 	Name string `json:"name,omitempty"` | ||||||
| 
 | 
 | ||||||
| 	validated atomic.Value | 	validated atomic.Value | ||||||
| } | } | ||||||
|  | |||||||
| @ -20,11 +20,11 @@ type ConnectionHandlers struct { | |||||||
| 	// The maximum number of concurrent connections the server may serve. | 	// The maximum number of concurrent connections the server may serve. | ||||||
| 	// | 	// | ||||||
| 	// DefaultConcurrency is used if not set. | 	// DefaultConcurrency is used if not set. | ||||||
| 	Network          string        `json:"network"` | 	Network          string        `json:"network,omitempty"` | ||||||
| 	Address          string        `json:"address"` | 	Address          string        `json:"address,omitempty"` | ||||||
| 	Concurrency      int           `json:"concurrency"` | 	Concurrency      int           `json:"concurrency,omitempty"` | ||||||
| 	KeepAlive        time.Duration `json:"keepAlive"` | 	KeepAlive        time.Duration `json:"keepAlive,omitempty"` | ||||||
| 	HandshakeTimeout time.Duration `json:"handshakeTimeout"` | 	HandshakeTimeout time.Duration `json:"handshakeTimeout,omitempty"` | ||||||
| 	TLSConfig        *tls.Config   `json:"-"` | 	TLSConfig        *tls.Config   `json:"-"` | ||||||
| 	validated        atomic.Value | 	validated        atomic.Value | ||||||
| } | } | ||||||
|  | |||||||
| @ -14,7 +14,7 @@ type ReadWriteHandler interface { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| type ReadWriteHandlers struct { | type ReadWriteHandlers struct { | ||||||
| 	MaxMessageSize int64 `json:"maxMessageSize"` | 	MaxMessageSize int64 `json:"maxMessageSize,omitempty"` | ||||||
| 	// Per-connection buffer size for requests' reading. | 	// Per-connection buffer size for requests' reading. | ||||||
| 	// This also limits the maximum header size. | 	// This also limits the maximum header size. | ||||||
| 	// | 	// | ||||||
| @ -22,23 +22,23 @@ type ReadWriteHandlers struct { | |||||||
| 	// and/or multi-KB headers (for example, BIG cookies). | 	// and/or multi-KB headers (for example, BIG cookies). | ||||||
| 	// | 	// | ||||||
| 	// Default buffer size is used if not set. | 	// Default buffer size is used if not set. | ||||||
| 	ReadBufferSize int `json:"readBufferSize"` | 	ReadBufferSize int `json:"readBufferSize,omitempty"` | ||||||
| 	// Per-connection buffer size for responses' writing. | 	// Per-connection buffer size for responses' writing. | ||||||
| 	// | 	// | ||||||
| 	// Default buffer size is used if not set. | 	// Default buffer size is used if not set. | ||||||
| 	WriteBufferSize int `json:"writeBufferSize"` | 	WriteBufferSize int `json:"writeBufferSize,omitempty"` | ||||||
| 	// Maximum duration for reading the full request (including body). | 	// Maximum duration for reading the full request (including body). | ||||||
| 	// | 	// | ||||||
| 	// This also limits the maximum duration for idle keep-alive | 	// This also limits the maximum duration for idle keep-alive | ||||||
| 	// connections. | 	// connections. | ||||||
| 	// | 	// | ||||||
| 	// By default request read timeout is unlimited. | 	// By default request read timeout is unlimited. | ||||||
| 	ReadTimeout time.Duration `json:"readTimeout"` | 	ReadTimeout time.Duration `json:"readTimeout,omitempty"` | ||||||
| 
 | 
 | ||||||
| 	// Maximum duration for writing the full response (including body). | 	// Maximum duration for writing the full response (including body). | ||||||
| 	// | 	// | ||||||
| 	// By default response write timeout is unlimited. | 	// By default response write timeout is unlimited. | ||||||
| 	WriteTimeout time.Duration `json:"writeTimeout"` | 	WriteTimeout time.Duration `json:"writeTimeout,omitempty"` | ||||||
| 
 | 
 | ||||||
| 	validated atomic.Value | 	validated atomic.Value | ||||||
| } | } | ||||||
|  | |||||||
| @ -22,7 +22,7 @@ type ServerHandlers struct { | |||||||
| 	// Server name for sending in response headers. | 	// Server name for sending in response headers. | ||||||
| 	// | 	// | ||||||
| 	// Default server name is used if left blank. | 	// Default server name is used if left blank. | ||||||
| 	Name string `json:"name"` | 	Name string `json:"name,omitempty"` | ||||||
| 
 | 
 | ||||||
| 	validated atomic.Value | 	validated atomic.Value | ||||||
| } | } | ||||||
|  | |||||||
| @ -17,8 +17,8 @@ type ClientConnHandler interface { | |||||||
| type ClientConnHandlers struct { | type ClientConnHandlers struct { | ||||||
| 	server.ConnectionHandlers | 	server.ConnectionHandlers | ||||||
| 
 | 
 | ||||||
| 	ReconnectInterval time.Duration `json:"reconnectInterval"` | 	ReconnectInterval time.Duration `json:"reconnectInterval,omitempty"` | ||||||
| 	ReconnectTryTime  int           `json:"reconnectTryTime"` | 	ReconnectTryTime  int           `json:"reconnectTryTime,omitempty"` | ||||||
| 
 | 
 | ||||||
| 	validated atomic.Value | 	validated atomic.Value | ||||||
| } | } | ||||||
|  | |||||||
| @ -18,8 +18,8 @@ type Connectors struct { | |||||||
| 	socket.ClientConnHandlers | 	socket.ClientConnHandlers | ||||||
| 	socket.ReadWriteHandlers | 	socket.ReadWriteHandlers | ||||||
| 
 | 
 | ||||||
| 	Network      string   `json:"network"` | 	Network      string   `json:"network,omitempty"` | ||||||
| 	Address      string   `json:"address"` | 	Address      string   `json:"address,omitempty"` | ||||||
| 	LocalAddress net.Addr `json:"-"` | 	LocalAddress net.Addr `json:"-"` | ||||||
| 
 | 
 | ||||||
| 	stopChan chan struct{} | 	stopChan chan struct{} | ||||||
|  | |||||||
| @ -19,11 +19,11 @@ type ReadWriteHandler interface { | |||||||
| type ReadWriteHandlers struct { | type ReadWriteHandlers struct { | ||||||
| 	server.ReadWriteHandlers | 	server.ReadWriteHandlers | ||||||
| 
 | 
 | ||||||
| 	PongTimeout time.Duration `json:"pongTimeout"` | 	PongTimeout time.Duration `json:"pongTimeout,omitempty"` | ||||||
| 	PingTimeout time.Duration `json:"pingTimeout"` | 	PingTimeout time.Duration `json:"pingTimeout,omitempty"` | ||||||
| 	PingPeriod  time.Duration `json:"pingPeriod"` | 	PingPeriod  time.Duration `json:"pingPeriod,omitempty"` | ||||||
| 
 | 
 | ||||||
| 	EnableCompression bool `json:"enableCompression"` | 	EnableCompression bool `json:"enableCompression,omitempty"` | ||||||
| 
 | 
 | ||||||
| 	validated atomic.Value | 	validated atomic.Value | ||||||
| } | } | ||||||
|  | |||||||
| @ -30,11 +30,11 @@ type Connectors struct { | |||||||
| 	socket.ClientConnHandlers | 	socket.ClientConnHandlers | ||||||
| 	socket.ReadWriteHandlers | 	socket.ReadWriteHandlers | ||||||
| 
 | 
 | ||||||
| 	URL string `json:"url"` | 	URL string `json:"url,omitempty"` | ||||||
| 
 | 
 | ||||||
| 	RequestHeader func() http.Header `json:"-"` | 	RequestHeader func() http.Header `json:"-"` | ||||||
| 
 | 
 | ||||||
| 	Subprotocols []string `json:"subprotocols"` | 	Subprotocols []string `json:"subprotocols,omitempty"` | ||||||
| 	// Jar specifies the cookie jar. | 	// Jar specifies the cookie jar. | ||||||
| 	// If Jar is nil, cookies are not sent in requests and ignored | 	// If Jar is nil, cookies are not sent in requests and ignored | ||||||
| 	// in responses. | 	// in responses. | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user