rpc

package
v0.0.0-...-c4e08cc Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(ctx context.Context, msg []byte) []byte

Handler gets raw json data and try to parse it as JsonRPC 2.0, it will look for the function in the regitser hand pack the needed types for arguments for this function If the function takes a context as first argument, this will be taken from the handler argument

func Reg

func Reg(name string, fptr interface{}) error

Reg register a normal go function as a RPC

func Setup

func Setup(r chi.Router)

Setup a middleware handler

Types

This section is empty.

Jump to

Keyboard shortcuts

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