aurestbreakerprometheus

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: MIT Imports: 6 Imported by: 0

README

go-autumn-restclient-circuitbreaker-prometheus

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

About go-autumn

A collection of libraries for enterprise microservices in golang that

  • is heavily inspired by Spring Boot / Spring Cloud
  • is very opinionated
  • names modules by what they do
  • unlike Spring Boot avoids certain types of auto-magical behaviour
  • is not a library monolith, that is every part only depends on the api parts of the other components at most, and the api parts do not add any dependencies.

Fall is my favourite season, so I'm calling it go-autumn.

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