modulepackage
0.0.0-20200619075325-34a34786ab54
Repository: https://github.com/drep-project/rpc.git
Documentation: pkg.go.dev
# Functions
DefaultHTTPEndpoint returns the HTTP endpoint used by default.
DefaultHTTPEndpoint returns the HTTP endpoint used by default.
DefaultWSEndpoint returns the websocket endpoint used by default.
Dial creates a new client for the given URL.
DialContext creates a new RPC client, just like Dial.
DialHTTP creates a new RPC client that connects to an RPC server over HTTP.
DialHTTPWithClient creates a new RPC client that connects to an RPC server over HTTP using the provided HTTP Client.
DialInProc attaches an in-process connection to the given RPC server.
DialIPC create a new IPC client that connects to the given endpoint.
DialStdIO creates a client on stdin/stdout.
DialWebsocket creates a new RPC client that communicates with a JSON-RPC server that is listening on the given endpoint.
ipcListen will create a Unix socket on the given endpoint.
isBatch returns true when the first non-whitespace characters is '['.
NewCodec creates a new RPC server codec with support for JSON-RPC 2.0 based on explicitly given encoding and decoding methods.
NewHTTPServer creates a new HTTP RPC server around an API provider.
NewID generates a identifier that can be used as an identifier in the RPC interface.
NewJSONCodec creates a new RPC server codec with support for JSON-RPC 2.0.
NewServer will create a new server instance with no registered handlers.
NewWSServer creates a new websocket RPC server around an API provider.
NotifierFromContext returns the Notifier value stored in ctx, if any.
No description provided by the author
# Constants
No description provided by the author
Default host interface for the HTTP RPC server.
Default TCP port for the HTTP RPC server.
Default host interface for the REST RPC server.
Default TCP port for the REST RPC server.
Default host interface for the websocket RPC server.
Default TCP port for the websocket RPC server.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
OptionMethodInvocation is an indication that the codec supports RPC method calls.
support pub sub.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
DefaultHTTPTimeouts represents the default timeout values used if further configuration is not provided.
No description provided by the author
No description provided by the author
ErrNotificationsUnsupported is returned when the connection doesn't support notifications.
ErrNotificationNotFound is returned when the notification for the given id is not found.
No description provided by the author
# Structs
API describes the set of methods offered over the RPC interface.
BatchElem is an element in a batch request.
logic error, callback returned an error.
Client represents a connection to an RPC server.
A ClientSubscription represents a subscription established through EthSubscribe.
HTTPTimeouts represents the configuration params for the HTTP RPC server.
received message is invalid.
unable to decode supplied params, or an invalid number of parameters.
received message isn't a valid request.
A value of this type can a JSON-RPC request, notification, successful response or error response.
request is for an unknown service.
Notifier is tight to a RPC connection that supports subscriptions.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RPCService gives meta information about the server.
Server represents a RPC server.
issued when a request is received after the server is issued to stop.
a Subscription is created by a notifier and tight to that notifier.
# Interfaces
Error wraps RPC errors, which contain an error code in addition to the message.
ServerCodec implements reading, parsing and writing RPC messages for the server side of a RPC session.
# Type aliases
No description provided by the author
CodecOption specifies which type of messages this codec supports.
ID defines a pseudo random number that is used to identify RPC subscriptions.