Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultURL = "http://127.0.0.1:10000"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Case ¶
type Expect ¶
type Expect struct {
RequestHeaders []HeaderMatch `json:"requestHeaders"`
ResponseHeaders []HeaderMatch `json:"responseHeaders"`
ResponseBody *StringMatch `json:"responseBody"`
}
type HeaderMatch ¶
type HeaderMatch struct {
Name *string `json:"name"`
Exact *string `json:"exact"`
Absent *bool `json:"absent"`
Regex *string `json:"regex"`
MatchAction MatchAction `json:"matchAction"`
}
TODO(cainelli): Use the generic StringMatch
func (*HeaderMatch) MatchType ¶
func (hm *HeaderMatch) MatchType() string
func (*HeaderMatch) MatchValue ¶
func (hm *HeaderMatch) MatchValue() string
type HeaderValue ¶
type Headers ¶
type Headers []HeaderValue
type MatchAction ¶
type MatchAction string
const ( MatchActionFirst MatchAction = "FIRST" MatchActionAny MatchAction = "ANY" MatchActionAll MatchAction = "ALL" )
type Retry ¶
type Retry struct {
MaxAttempts int // Maximum number of retries
WaitMin time.Duration // Minimum time to wait
WaitMax time.Duration // Maximum time to wait
// PostHook specifies a policy for handling retries. It is called
// following each request with the response and error values returned by
// the http call. If PostHook returns false, the Client stops retrying
PostHook func(Actual) bool
}
type StringMatch ¶
type StringMatch struct {
Exact *string `json:"exact"`
Absent *bool `json:"absent"`
Regex *string `json:"regex"`
MatchAction MatchAction `json:"matchAction"`
}
func (*StringMatch) MatchType ¶
func (sm *StringMatch) MatchType() string
func (*StringMatch) MatchValue ¶
func (sm *StringMatch) MatchValue() string
Click to show internal directories.
Click to hide internal directories.