metrics

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmitCurrentBlock

func EmitCurrentBlock(contractAddress string, block int)

func EmitGetLogsDuration

func EmitGetLogsDuration(contractAddress string, duration time.Duration)

func EmitNumLogsFound

func EmitNumLogsFound(contractAddress string, numLogs int)

func MeasureGetLogs

func MeasureGetLogs[Return any](contractAddress string, fn func() (Return, error)) (Return, error)

Types

type Server

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

func NewMetricsServer

func NewMetricsServer(
	ctx context.Context,
	address string,
	port int,
	log *zap.Logger,
	reg *prometheus.Registry,
) (*Server, error)

func (*Server) Close

func (s *Server) Close() error

Jump to

Keyboard shortcuts

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