package
0.0.0-20240305091328-aa4207a4b25d
Repository: https://github.com/badrootd/celestia-core.git
Documentation: pkg.go.dev
# Functions
Cacheable enables returning a cache control header from RPC functions to which it is applied.
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.
WriteCacheableRPCResponseHTTP marshals res as JSON (with indent) and writes it to w.
WriteChanCapacity sets the capacity of the websocket write channel.
WriteRPCResponseHTTP marshals res as JSON (with indent) and writes it to w.
WriteRPCResponseHTTPError marshals res as JSON (with indent) and writes it to w.
WriteWait sets the amount of time to wait before a websocket write times out.
Ws enables WebSocket communication.
# 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.
# Type aliases
No description provided by the author