expvar

package
v0.0.0-...-1f9e35f Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package expvar manages the publishing of metrics to stdout.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Expvar

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

Expvar provide our basic publishing.

func New

func New(log *zap.SugaredLogger, host string, route string, readTimeout, writeTimeout time.Duration, idleTimeout time.Duration) *Expvar

New starts a service for consuming the raw expvar stats.

func (*Expvar) Publish

func (exp *Expvar) Publish(data map[string]any)

Publish is called by the publisher goroutine and saves the raw stats.

func (*Expvar) Stop

func (exp *Expvar) Stop(shutdownTimeout time.Duration)

Stop shuts down the service.

Jump to

Keyboard shortcuts

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