Documentation ¶
Index ¶
- type BeforeServeFunc
- type JsonrpcOptions
- type JsonrpcServiceImpl
- func (*JsonrpcServiceImpl) Ping(val string, val2 int) (res string, err error)
- func (j *JsonrpcServiceImpl) SetAllowOriginFunc(f func(string) bool)
- func (j *JsonrpcServiceImpl) SetOrigins(origins []string)
- func (j *JsonrpcServiceImpl) Start(beforeServeFunc BeforeServeFunc) error
- func (j *JsonrpcServiceImpl) Stop()
- type RPCHandler
- type RpcServiceDelegate
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{} }
Click to show internal directories.
Click to hide internal directories.