test

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MockJSONRPCServer

func MockJSONRPCServer(requestChan chan *RequestData) (*httptest.Server, func(string))

MockJSONRPCServer creates a JSONRPC server that can be used to test clients NOTE: if you want to make sure that you get requests in your requestChan one by one, limit the channel to a buffer size of 1. then writes to the chan will block until you read it

Types

type RequestData

type RequestData struct {
	Request *http.Request
	Body    string
}

Jump to

Keyboard shortcuts

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