Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RPCConfig ¶
type RPCConfig struct {
RootDir string `json:"home" toml:"home"`
// TCP or UNIX socket address for the RPC server to listen on
ListenAddress string `json:"laddr" toml:"laddr" comment:"TCP or UNIX socket address for the RPC server to listen on"`
// A list of origins a cross-domain request can be executed from.
// If the special '*' value is present in the list, all origins will be allowed.
// An origin may contain a wildcard (*) to replace 0 or more characters (i.e.: http://*.domain.com).
// Only one wildcard can be used per origin.
CORSAllowedOrigins []string `` /* 206-byte string literal not displayed */
// A list of methods the client is allowed to use with cross-domain requests.
CORSAllowedMethods []string `` /* 139-byte string literal not displayed */
// A list of non simple headers the client is allowed to use with cross-domain requests.
CORSAllowedHeaders []string `` /* 150-byte string literal not displayed */
// TCP or UNIX socket address for the gRPC server to listen on
// NOTE: This server only supports /broadcast_tx_commit
GRPCListenAddress string `` /* 160-byte string literal not displayed */
// Maximum number of simultaneous connections.
// Does not include RPC (HTTP&WebSocket) connections. See max_open_connections
// If you want to accept a larger number than the default, make sure
// you increase your OS limits.
// 0 - unlimited.
GRPCMaxOpenConnections int `` /* 460-byte string literal not displayed */
// Activate unsafe RPC commands like /dial_persistent_peers and /unsafe_flush_mempool
Unsafe bool `json:"unsafe" toml:"unsafe" comment:"Activate unsafe RPC commands like /dial_seeds and /unsafe_flush_mempool"`
// Maximum number of simultaneous connections (including WebSocket).
// Does not include gRPC connections. See grpc_max_open_connections
// If you want to accept a larger number than the default, make sure
// you increase your OS limits.
// 0 - unlimited.
// Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files}
// 1024 - 40 - 10 - 50 = 924 = ~900
MaxOpenConnections int `` /* 461-byte string literal not displayed */
// How long to wait for a tx to be committed during /broadcast_tx_commit
// WARNING: Using a value larger than 10s will result in increasing the
// global HTTP write timeout, which applies to all connections and endpoints.
// See https://github.com/gnolang/gno/tm2/pkg/bft/issues/3435
TimeoutBroadcastTxCommit time.Duration `` /* 354-byte string literal not displayed */
// Maximum size of request body, in bytes
MaxBodyBytes int64 `json:"max_body_bytes" toml:"max_body_bytes" comment:"Maximum size of request body, in bytes"`
// Maximum size of request header, in bytes
MaxHeaderBytes int `json:"max_header_bytes" toml:"max_header_bytes" comment:"Maximum size of request header, in bytes"`
// The path to a file containing certificate that is used to create the HTTPS server.
// Might be either absolute path or path related to tendermint's config directory.
//
// If the certificate is signed by a certificate authority,
// the certFile should be the concatenation of the server's certificate, any intermediates,
// and the CA's certificate.
//
// NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. Otherwise, HTTP server is run.
TLSCertFile string `` /* 524-byte string literal not displayed */
// The path to a file containing matching private key that is used to create the HTTPS server.
// Might be either absolute path or path related to tendermint's config directory.
//
// NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. Otherwise, HTTP server is run.
TLSKeyFile string `` /* 353-byte string literal not displayed */
}
RPCConfig defines the configuration options for the Tendermint RPC server
func DefaultRPCConfig ¶
func DefaultRPCConfig() *RPCConfig
DefaultRPCConfig returns a default configuration for the RPC server
func TestRPCConfig ¶
func TestRPCConfig() *RPCConfig
TestRPCConfig returns a configuration for testing the RPC server
func (*RPCConfig) IsCorsEnabled ¶
IsCorsEnabled returns true if cross-origin resource sharing is enabled. XXX review.
func (RPCConfig) IsTLSEnabled ¶
func (*RPCConfig) ValidateBasic ¶
ValidateBasic performs basic validation (checking param bounds, etc.) and returns an error if any check fails.
Click to show internal directories.
Click to hide internal directories.