metrics

package
v0.0.62 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	UseSecure      bool
	BasicUserName  string
	BasicPassword  string
	Enable         bool
	HandlerFunc    http.HandlerFunc
	ListenPort     int
	ReadTimeout    time.Duration
	WriteTimeout   time.Duration
	MaxHeaderBytes int
}

type Metrics

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

func New

func New(conf *Config) (*Metrics, error)

New creates a new instance of the Metrics based on the provided configuration.

func (Metrics) Start

func (s Metrics) Start(_ context.Context) error

Start starts the Metrics by listening for incoming connections.

func (Metrics) Stop

func (s Metrics) Stop(ctx context.Context) error

Stop stops the Metrics gracefully by shutting down the HTTP server.

Jump to

Keyboard shortcuts

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