Documentation
¶
Index ¶
- func ConfigureHystrixCommand(hystrixCommandName string, timeoutMs int)
- func HystrixPerformGET(ctx context.Context, hystrixCommandName string, httpClient *http.Client, ...) (string, int, error)
- func HystrixPerformPOST(ctx context.Context, hystrixCommandName string, httpClient *http.Client, ...) (string, int, error)
- func HystrixPerformPUT(ctx context.Context, hystrixCommandName string, httpClient *http.Client, ...) (string, int, error)
- func ParseJson(body string, dto interface{}) error
- func PerformGET(ctx context.Context, httpClient *http.Client, url string, requestBody string) (string, int, error)
- func PerformPOST(ctx context.Context, httpClient *http.Client, url string, requestBody string) (string, int, error)
- func PerformPUT(ctx context.Context, httpClient *http.Client, url string, requestBody string) (string, int, error)
- func RenderJson(dto interface{}) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureHystrixCommand ¶
Configures hystrix command timeout, concurrency and error threshold
func HystrixPerformGET ¶
func HystrixPerformGET(ctx context.Context, hystrixCommandName string, httpClient *http.Client, url string) (string, int, error)
Performs a http GET, returning the response body and status and passing on the request id if present in the context.
The request is wrapped with a hystrix circuit breaker and timeout.
Note: you must make at least one call to ConfigureHystrixCommand() before calling this.
func HystrixPerformPOST ¶
func HystrixPerformPOST(ctx context.Context, hystrixCommandName string, httpClient *http.Client, url string, requestBody string) (string, int, error)
Performs a http POST, returning the response body and status and passing on the request id if present in the context.
The request is wrapped with a hystrix circuit breaker and timeout.
Note: you must make at least one call to ConfigureHystrixCommand() before calling this.
func HystrixPerformPUT ¶
func HystrixPerformPUT(ctx context.Context, hystrixCommandName string, httpClient *http.Client, url string, requestBody string) (string, int, error)
Performs a http PUT, returning the response body and status and passing on the request id if present in the context.
The request is wrapped with a hystrix circuit breaker and timeout.
Note: you must make at least one call to ConfigureHystrixCommand() before calling this.
func PerformGET ¶
func PerformGET(ctx context.Context, httpClient *http.Client, url string, requestBody string) (string, int, error)
performs a http GET, returning the response body and status and passing on the request id if present in the context
func PerformPOST ¶
func PerformPOST(ctx context.Context, httpClient *http.Client, url string, requestBody string) (string, int, error)
performs a http POST, returning the response body and status and passing on the request id if present in the context
func PerformPUT ¶
func PerformPUT(ctx context.Context, httpClient *http.Client, url string, requestBody string) (string, int, error)
performs a http PUT, returning the response body and status and passing on the request id if present in the context
func RenderJson ¶
Types ¶
This section is empty.