fakes

package
v0.0.44 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2015 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeClient

type FakeClient struct {
	StatusCode int
	CallCount  int
	Error      error

	RequestBodies []string
	Requests      []*http.Request
	// contains filtered or unexported fields
}

func NewFakeClient

func NewFakeClient() (fakeClient *FakeClient)

func (*FakeClient) AddDoBehavior

func (c *FakeClient) AddDoBehavior(resp *http.Response, err error)

func (*FakeClient) Do

func (c *FakeClient) Do(req *http.Request) (*http.Response, error)

func (*FakeClient) SetMessage

func (c *FakeClient) SetMessage(message string)

func (*FakeClient) SetNilResponse

func (c *FakeClient) SetNilResponse()

type FakeRequestRetryable

type FakeRequestRetryable struct {
	AttemptCalled int
	// contains filtered or unexported fields
}

func NewFakeRequestRetryable

func NewFakeRequestRetryable() *FakeRequestRetryable

func (*FakeRequestRetryable) AddAttemptBehavior

func (r *FakeRequestRetryable) AddAttemptBehavior(response *http.Response, isRetryable bool, err error)

func (*FakeRequestRetryable) Attempt

func (r *FakeRequestRetryable) Attempt() (bool, error)

func (*FakeRequestRetryable) Attempts

func (r *FakeRequestRetryable) Attempts() int

func (*FakeRequestRetryable) Response

func (r *FakeRequestRetryable) Response() *http.Response

Jump to

Keyboard shortcuts

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