Discover Packages
github.com/1lann/rpc
package
module
Version:
v0.0.0-...-e50759e
Opens a new window with list of versions in this module.
Published: May 17, 2018
License: MIT
Opens a new window with license information.
Imports: 10
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
rpc
A stupid simple directionless RPC for Go.
Expand ▾
Collapse ▴
Documentation
¶
Client represents a client.
NewClient returns a new client on the given connection.
Close closes the underlying client connection.
Do performs a blocking request that blocks until the handler on the
remote end responds. The value of the response is returned. Errors
from the remote end are moved into the second return argument additionally.
Fire fires an event with the given payload asynchronously.
On registers a handler for handling an event.
Receive runs the receive loop to process incoming packets. It returns
when the connection dies, and a new client will need to be spawned.
type Handler func(payload interface{}) interface{}
Handler represents the handler used for receiving events.
type Packet struct {
Event string
ID string
ExpectReply bool
Payload interface{}
}
Packet represents a packet that is serialized for lidar use.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.