Documentation
¶
Index ¶
- type Transport
- func (t *Transport) Close() error
- func (t *Transport) Done() <-chan struct{}
- func (t *Transport) GetRouter() *transport.MessageRouter
- func (t *Transport) Logf(format string, args ...interface{})
- func (t *Transport) Send(ctx context.Context, msg *types.Message) error
- func (t *Transport) SetLogger(l logger.Logger)
- func (t *Transport) Start(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
Transport is a Transport implementation that reads from an io.ReadCloser and writes to an io.WriteCloser using the jsonrpc2 library.
func NewTransport ¶
func NewTransport(stdin io.ReadCloser, stdout io.WriteCloser) *Transport
NewTransport constructs a transport from a read/write pair (usually pipes).
func (*Transport) Close ¶
Close closes the connection and signals done, but also waits for the goroutine.
func (*Transport) Done ¶
func (t *Transport) Done() <-chan struct{}
Done is closed once this transport is fully closed
func (*Transport) GetRouter ¶
func (t *Transport) GetRouter() *transport.MessageRouter
GetRouter returns this transport's MessageRouter
func (*Transport) Send ¶
Send sends a single JSON-RPC message. If it’s a request, we wait for a response.
Click to show internal directories.
Click to hide internal directories.