dasrpc

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2021 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BeforeServeFunc

type BeforeServeFunc func(w http.ResponseWriter, r *http.Request)

type JsonrpcOptions

type JsonrpcOptions struct {
	Port string
}

type JsonrpcServiceImpl

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

func NewJsonrpcService

func NewJsonrpcService(port string, delegate ...*RpcServiceDelegate) *JsonrpcServiceImpl

func (*JsonrpcServiceImpl) Ping

func (*JsonrpcServiceImpl) Ping(val string, val2 int) (res string, err error)

func (*JsonrpcServiceImpl) SetAllowOriginFunc

func (j *JsonrpcServiceImpl) SetAllowOriginFunc(f func(string) bool)

func (*JsonrpcServiceImpl) SetOrigins

func (j *JsonrpcServiceImpl) SetOrigins(origins []string)

func (*JsonrpcServiceImpl) Start

func (j *JsonrpcServiceImpl) Start(beforeServeFunc BeforeServeFunc) error

func (*JsonrpcServiceImpl) Stop

func (j *JsonrpcServiceImpl) Stop()

type RPCHandler

type RPCHandler struct {
	BeforeServe BeforeServeFunc
	// contains filtered or unexported fields
}

func NewRPCHandler

func NewRPCHandler(srv *rpc.Server, cors *cors.Cors, cb BeforeServeFunc) RPCHandler

func (RPCHandler) ServeHTTP

func (rpc RPCHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type RpcServiceDelegate

type RpcServiceDelegate struct {
	Name    string
	Element interface{}
}

Jump to

Keyboard shortcuts

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