export

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package export is a standalone package to deal with expvar data. Other packages can import this one to expose debug details on the expvar interface. More exports can be easily added.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMap

func GetMap(name string) *expvar.Map

GetMap returns an unpublished map if one exists, or returns a new one.

func GetPublishedMap

func GetPublishedMap(name string) *expvar.Map

GetPublishedMap returns a published map if one exists, or returns a new one.

func Init

func Init(name string)

Init needs to be called before using the Map.

Types

type Data

type Data struct {
	*expvar.Map
	StartAt    expvar.String
	Version    expvar.String
	ConfigFile expvar.String
	ListenPort expvar.Int
	HTTPVisits expvar.Int
	DefaultURL expvar.Int
	Files      expvar.Int
	Sent       expvar.Int
	Recv       expvar.Int
	Errors     expvar.Int
}

Data contains our expvar exports.

var Map *Data

Jump to

Keyboard shortcuts

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