fetch

package
v0.0.0-...-53986ba Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Expvar

type Expvar struct {
	*jason.Object
}

Expvar represents fetched expvar variable.

func FetchExpvar

func FetchExpvar(u url.URL, opts ...HTTPClientOption) (*Expvar, error)

FetchExpvar fetches expvar by http for the given addr (host:port)

func FetchRaw

func FetchRaw(ctx context.Context, namesets []string) (*Expvar, error)

FetchRaw fetches var object from expvar directly. Since expvar do not support the Range operation, the namesets here is required. e.g.: []string{"memstats","cmdline","YOUR_CUSTMIZED_FIELD"}

func ParseExpvar

func ParseExpvar(r io.Reader) (*Expvar, error)

ParseExpvar parses expvar data from reader.

type HTTPClientOption

type HTTPClientOption func(*http.Client)

Jump to

Keyboard shortcuts

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