testutil

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MockConsulResponse

func MockConsulResponse(name string, tags []string, addresses ...net.Addr) *httptest.Server

func NewTestServer

func NewTestServer(router http.Handler) *httptest.Server

func SetupMockConsulResponse

func SetupMockConsulResponse(response string) *httptest.Server

func StartTestConsulServer

func StartTestConsulServer() net.Listener

Types

type MockConsul

type MockConsul struct {
	// contains filtered or unexported fields
}

func NewMockConsul

func NewMockConsul(response string) *MockConsul

func (*MockConsul) GetMockServer

func (self *MockConsul) GetMockServer() *httptest.Server

func (*MockConsul) ResetHandlerResponse

func (self *MockConsul) ResetHandlerResponse(response string)

Jump to

Keyboard shortcuts

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