Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*jrpcOpt)
func WithCorsOrigins ¶
WithCorsOrigins is an Option function that allows setting custom CORS options for the JSON-RPC server. It takes a pointer to a cors.Options object and updates the server's configuration to use the provided CORS settings. This function enables the configuration of allowed origins, methods, headers, and other CORS-related options.
Usage example:
server := NewServer(WithCorsOrigins(&cors.Options{
AllowedOrigins: []string{"https://example.com"},
}))
func WithCustomHeaders ¶
WithCustomHeaders add custom headers to metadata.MD
func WithReadHeaderTimeout ¶
WithReadHeaderTimeout set custom read header timeout
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) GracefulStop ¶
GracefulStop stops the JRPC server gracefully. It stops the server from accepting new connections.
func (*Server) RegisterServices ¶
RegisterServices register jgw servers to jrpc handler
Click to show internal directories.
Click to hide internal directories.