rpc

package
v0.0.0-...-86c7e5b Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandleFunc

type HandleFunc = func(*Writer, *json.RawMessage) error

type Handler

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

func NewHandler

func NewHandler() *Handler

func (*Handler) Add

func (h *Handler) Add(name string, f interface{})

func (*Handler) Handle

func (h *Handler) Handle(ctx context.Context, conn *jsonrpc2.Conn, r *jsonrpc2.Request)

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Writer

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

func (*Writer) Notify

func (w *Writer) Notify(method string, a interface{}) error

func (*Writer) Reply

func (w *Writer) Reply(a interface{}) error

func (*Writer) SendError

func (w *Writer) SendError(code int64, msg string, v interface{}) error

Jump to

Keyboard shortcuts

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