Documentation ¶
Index ¶
- Variables
- func BuildErrResp(id string, e Error) []byte
- func ServeWithReconnect(ctx context.Context, cli TransportWithConnect, caller Caller, o ...Option)
- type Caller
- type Error
- type NextReader
- type NextWriter
- type NotificationService
- type Option
- type RPC
- type Request
- type Service
- type Transport
- type TransportWithConnect
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrParse = Error{/* contains filtered or unexported fields */} ErrInvalidRequest = Error{/* contains filtered or unexported fields */} ErrMethodNotFound = Error{/* contains filtered or unexported fields */} ErrInvalidParams = Error{/* contains filtered or unexported fields */} ErrInternal = Error{/* contains filtered or unexported fields */} ErrServer = Error{/* contains filtered or unexported fields */} )
Functions ¶
func BuildErrResp ¶
func ServeWithReconnect ¶
func ServeWithReconnect(ctx context.Context, cli TransportWithConnect, caller Caller, o ...Option)
Types ¶
type Caller ¶
Caller interface this method invokes on request and encode response as jsonrpc response
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
type NextReader ¶
type NextWriter ¶
type NextWriter interface {
NextWriter() (io.WriteCloser, error)
}
type NotificationService ¶ added in v0.2.0
type NotificationService struct {
// contains filtered or unexported fields
}
func (NotificationService) ID ¶ added in v0.2.0
func (n NotificationService) ID() string
func (NotificationService) Send ¶ added in v0.2.0
func (n NotificationService) Send(value interface{})
Send message (as jsonrpc notification call) to core
type RPC ¶ added in v0.2.0
type RPC interface {
NewNotification(params objx.Map) NotificationService
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (Service) NewNotification ¶ added in v0.2.0
func (s Service) NewNotification(params objx.Map) NotificationService
type Transport ¶
type Transport interface { NextWriter NextReader }
type TransportWithConnect ¶
Click to show internal directories.
Click to hide internal directories.