Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RequestData ¶
RequestData - the request data sent to the server
func WaitForServerRequest ¶
func WaitForServerRequest(server *Server, waitFor, maxRequestTimeout time.Duration) *RequestData
WaitForServerRequest - wait until timeout or for the server sets the request in the channel
type ResponseData ¶
type ResponseData struct { RequestData Status int }
ResponseData - the expected response data for each configured URI
func DoRequest ¶
func DoRequest(testServerHost string, testServerPort int, request *RequestData) *ResponseData
DoRequest - does a request
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server - the server listening for HTTP requests
func NewServer ¶
func NewServer(host string, port, channelSize int, responses []ResponseData) *Server
NewServer - creates a new HTTP listener server
func (*Server) RequestChannel ¶
func (hs *Server) RequestChannel() <-chan *RequestData
RequestChannel - reads from the request channel
Click to show internal directories.
Click to hide internal directories.