metrics

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GrpcUnaryInterceptor added in v0.4.2

func GrpcUnaryInterceptor(metricsReporter Reporter) grpc.UnaryServerInterceptor

func InterceptSdk

func InterceptSdk(sdkId string, metricsHandler Reporter, transport http.RoundTripper) http.RoundTripper

func Measure

func Measure(metricsReporter Reporter, next http.HandlerFunc) http.HandlerFunc

Types

type Reporter

type Reporter interface {
	IncrementConnection(sdkId string, streamType string, flag string)
	DecrementConnection(sdkId string, streamType string, flag string)
	AddSentMessageCount(count int, sdkId string, streamType string, flag string)

	HttpHandler() http.Handler
}

func NewReporter

func NewReporter() Reporter

Jump to

Keyboard shortcuts

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