router

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Router

type Router struct {
	// contains filtered or unexported fields
}

Router is default RPC router implementation.

func New

func New() *Router

New creates new router instance.

func (*Router) Invoke

func (router *Router) Invoke(methodName string, params interface{}) (interface{}, jsonrpc.Error)

Invoke accepts method name and invoke registered method with same name. If requested method is not registered - error will be returned.

func (*Router) MethodIsRegistered

func (router *Router) MethodIsRegistered(methodName string) bool

MethodIsRegistered returns `true` only if passed method is registered.

func (*Router) RegisterMethod

func (router *Router) RegisterMethod(method jsonrpc.Method) error

RegisterMethod make a method registration for later invoking.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL