Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Provide(New)
Module is an fx module to handle JSON-RPC requests.
Functions ¶
This section is empty.
Types ¶
type ConnectionManager ¶
type ConnectionManager interface {
NewConnection(ctx context.Context, conn *jsonrpc2.Conn) (router Router, err error)
RemoveConnection(ctx context.Context, id uuid.UUID)
}
ConnectionManager will manage each active connection and its corresponding Router throughout the lifecycle of a connection.
type JSONRPCModule ¶
type JSONRPCModule interface {
OnStart(ctx context.Context) error
ServeStream(ctx context.Context, conn jsonrpc2.Conn) error
RegisterConnectionManager(connectionManager ConnectionManager) error
}
JSONRPCModule represents a module to manage JSON-RPC requests.
func New ¶
func New(p Params) (JSONRPCModule, error)
New creates a new server to handle JSON-RPC requests on the given port and host.
type Params ¶
type Params struct {
fx.In
Config config.Provider
Lifecycle fx.Lifecycle
Logger *zap.SugaredLogger
ServerInfoFile serverinfofile.ServerInfoFile
}
Params define values to be used by JsonRpcHandler.
Click to show internal directories.
Click to hide internal directories.