aurestbreakerprometheus

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 6 Imported by: 0

README

go-autumn-restclient-circuitbreaker-prometheus

Prometheus instrumentation functions for go-autumn-restclient-circuitbreaker.

About go-autumn-restclient

It's a rest client that also supports x-www-form-urlencoded.

About go-autumn-restclient-circuitbreaker

This library adds another wrapper to the rest client which provides a circuit breaker.

About go-autumn-restclient-circuitbreaker-prometheus

Implements instrumentation callbacks that use prometheus/client_golang.

Usage

Use the provided callbacks while constructing your rest client stack.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientNameFromRequestUrl

func ClientNameFromRequestUrl(requestUrl string) string

func CountsCallback

func CountsCallback(circuitBreakerName string, counts gobreaker.Counts)

func InstrumentCircuitBreakerClient

func InstrumentCircuitBreakerClient(client aurestclientapi.Client)

func OutcomeFromStatus

func OutcomeFromStatus(status int) string

func SetupCircuitBreakerMetrics

func SetupCircuitBreakerMetrics()

func SetupCommon

func SetupCommon()

func StateChangeCallback

func StateChangeCallback(circuitBreakerName string, targetState string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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