util

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeBrokerServer

type FakeBrokerServer struct {

	// For inspecting on what was sent on the wire.
	RequestObject interface{}
	Request       *http.Request
	// contains filtered or unexported fields
}

FakeBrokerServer is a fake service broker server meant for testing that allows for customizing the response behavior. It does not support auth.

func (*FakeBrokerServer) SetAsynchronous

func (f *FakeBrokerServer) SetAsynchronous(numPolls int, shouldSucceed bool, operation string)

SetAsynchronous sets the number of polls before finished, final state, and operation for asynchronous operations.

func (*FakeBrokerServer) SetResponseStatus

func (f *FakeBrokerServer) SetResponseStatus(status int)

SetResponseStatus sets the default response status of the broker to the given HTTP status code.

func (*FakeBrokerServer) Start

func (f *FakeBrokerServer) Start() string

Start starts the fake broker server listening on a random port, passing back the server's URL.

func (*FakeBrokerServer) Stop

func (f *FakeBrokerServer) Stop()

Stop shuts down the server.

Jump to

Keyboard shortcuts

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