Skip to content

openfort-xyz/metrics

Repository files navigation

metrics

import "github.com/openfort-xyz/metrics"

Index

func ExposeHTTP() http.Handler

ExposeHTTP returns a http.Handler that exposes the metrics

func GRPCStreamMiddleware(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error

GRPCStreamMiddleware is a GRPC middleware that records the request count and duration of the request.

func GRPCUnaryMiddleware(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

GRPCUnaryMiddleware is a GRPC middleware that records the request count and duration of the request.

func HTTPMiddleware(next http.Handler) http.Handler

HTTPMiddleware is a HTTP middleware that records the request count and duration of the request.

func JSONRPCMiddleware(next jsonrpc.Handler) jsonrpc.Handler

func RabbitMQMiddleware(next pubsub.Handler) pubsub.Handler

RabbitMQMiddleware is a PubSub middleware that records the request count and duration of the request.

type Server

Server is a metrics server

type Server struct {
    // contains filtered or unexported fields
}

func NewServer(port int) *Server

NewServer creates a new metrics server

func (*Server) Start

func (s *Server) Start(_ context.Context) error

Start starts the metrics server

func (*Server) Stop

func (s *Server) Stop(ctx context.Context) error

Stop stops the metrics server

Generated by gomarkdoc

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages