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: 0

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