jsonrpc

package module
v0.0.0-...-8af9210 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2017 License: BSD-2-Clause Imports: 13 Imported by: 3

README

jsonrpc

jsonrpc wrapper for Go(version 1.3 or later)

feature

  • RPC-Server

    • HTTP-POST support
  • RPC-Client

    • Dial HTTP/HTTPS/SOCKFILE support

install

$ go get -u github.com/nobonobo/jsonrpc

Documentation

Index

Constants

View Source
const Connected = "200 Connected to JSON RPC"

Connected Response String for CONNECT/HTTP

Variables

View Source
var (
	// DefaultRPCPath ...
	DefaultRPCPath = "/jsonrpc"
	// DefaultServer ...
	DefaultServer = NewServer()
)

Functions

func HandleHTTP

func HandleHTTP()

HandleHTTP ...

func NewClient

func NewClient(endpoint string, config *tls.Config) (*rpc.Client, error)

NewClient Client for CONNECT/HTTP

func NewClientHTTP

func NewClientHTTP(endpoint string) *rpc.Client

NewClientHTTP ...

func NewClientLocal

func NewClientLocal() *rpc.Client

NewClientLocal ...

func Register

func Register(rcvr interface{}) error

Register ...

func ServeCodec

func ServeCodec(codec rpc.ServerCodec)

ServeCodec ...

Types

type Server

type Server struct {
	*rpc.Server
}

Server ...

func NewServer

func NewServer() *Server

NewServer ...

func (*Server) ServeHTTP

func (server *Server) ServeHTTP(w http.ResponseWriter, req *http.Request)

ServeHTTP implements an http.Handler that answers RPC requests.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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