rpc: document HTTPTimeouts.

This commit is contained in:
Ryan Schneider 2018-07-30 11:38:53 -07:00 committed by Péter Szilágyi
parent 96a49d97e5
commit 1307a9c89a
No known key found for this signature in database
GPG key ID: E9AE538CEDF8293D
2 changed files with 4 additions and 0 deletions

View file

@ -120,6 +120,8 @@ type Config struct {
// exposed.
HTTPModules []string `toml:",omitempty"`
// HTTPTimeouts allows for customization of the timeout values used by the HTTP RPC
// interface.
HTTPTimeouts rpc.HTTPTimeouts
// WSHost is the host interface on which to start the websocket RPC server. If

View file

@ -90,6 +90,8 @@ type HTTPTimeouts struct {
IdleTimeout time.Duration
}
// DefaultHTTPTimeouts represents the default timeout values used if further
// configuration is not provided.
var DefaultHTTPTimeouts = HTTPTimeouts{
ReadTimeout: 30 * time.Second,
WriteTimeout: 30 * time.Second,