Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ReliableRequest ¶
type ReliableRequest struct { Headers map[string]string HTTPClient *http.Client EnableCache bool TTLCache time.Duration EnableStaleCache bool TTLStaleCache time.Duration // contains filtered or unexported fields }
ReliableRequest - a struct holding params to make reliable requests
func NewReliableRequest ¶
func NewReliableRequest() *ReliableRequest
NewReliableRequest - create a new ReliableRequest
func (*ReliableRequest) Get ¶
func (rr *ReliableRequest) Get(url string) (string, error)
Get - returns the requested data as string and a possible error
func (*ReliableRequest) GetCache ¶ added in v0.0.2
func (rr *ReliableRequest) GetCache(key string) (string, bool)
func (*ReliableRequest) UpdateHystrixConfig ¶
func (rr *ReliableRequest) UpdateHystrixConfig(name string, conf hystrix.CommandConfig)
UpdateHystrixConfig - configure a new circuit breaker
Click to show internal directories.
Click to hide internal directories.