package
0.0.0-20230516101456-1d7836d562fc
Repository: https://github.com/exfury/grbchain.git
Documentation: pkg.go.dev

# Functions

DefaultConfig returns a default configuration.
Listen starts a new net.Listener on the given address.
NewRPCFunc wraps a function for introspection.
NewWebsocketManager returns a new WebsocketManager that passes a map of functions, connection options and logger to new WS connections.
NewWSRPCFunc wraps a function for introspection and use in the websockets.
OnDisconnect sets a callback which is used upon disconnect - not Goroutine-safe.
PingPeriod sets the duration for sending websocket pings.
ReadLimit sets the maximum size for reading message.
ReadWait sets the amount of time to wait before a websocket read times out.
RecoverAndLogHandler wraps an HTTP handler, adding error logging.
RegisterRPCFuncs adds a route for each function in the funcMap, as well as general jsonrpc and websocket handlers for all functions.
Serve creates a http.Server and calls Serve with the given listener.
Serve creates a http.Server and calls ServeTLS with the given listener, certFile and keyFile.
WriteChanCapacity sets the capacity of the websocket write channel.
WriteRPCResponseArrayHTTP will do the same as WriteRPCResponseHTTP, except it can write arrays of responses for batched request/response interactions via the JSON RPC.
No description provided by the author
No description provided by the author
WriteWait sets the amount of time to wait before a websocket write times out.

# Structs

Config is a RPC server configuration.
RPCFunc contains the introspected type information for a function.
WebsocketManager provides a WS handler for incoming connections and passes a map of functions along with any additional params to new connections.