exp

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LogFiles      = GetMap("Log File Information").Init()
	APIHits       = GetMap("Incoming API Requests").Init()
	HTTPRequests  = GetMap("Incoming HTTP Requests").Init()
	TimerEvents   = GetMap("Triggers and Timers Executed").Init()
	TimerCounts   = GetMap("Triggers and Timers Counters").Init()
	Website       = GetMap("Outbound Requests to Website").Init()
	ServiceChecks = GetMap("Service Check Responses").Init()
	Apps          = GetMap("Starr App Requests").Init()
	FileWatcher   = GetMap("File Watcher").Init()
)

Functions

func GetKeys

func GetKeys(mapName *expvar.Map) map[string]interface{}

func GetMap

func GetMap(name string) *expvar.Map

func GetSplitKeys

func GetSplitKeys(mapName *expvar.Map) map[string]map[string]interface{}

func NewFakeCloser added in v0.3.2

func NewFakeCloser(app, method string, body io.ReadCloser) io.ReadCloser

Types

type AllData

type AllData struct {
	LogFiles      map[string]interface{}
	APIHits       map[string]interface{}
	HTTPRequests  map[string]interface{}
	TimerEvents   map[string]map[string]interface{}
	TimerCounts   map[string]interface{}
	Website       map[string]interface{}
	ServiceChecks map[string]map[string]interface{}
	Apps          map[string]map[string]interface{}
	FileWatcher   map[string]interface{}
}

func GetAllData

func GetAllData() AllData

type LoggingRoundTripper added in v0.3.2

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

LoggingRoundTripper allows us to use a datacounter to log http request data.

func NewMetricsRoundTripper added in v0.3.2

func NewMetricsRoundTripper(app string, next http.RoundTripper) *LoggingRoundTripper

NewMetricsRoundTripper returns a round tripper to log requests counts and response sizes.

func (*LoggingRoundTripper) RoundTrip added in v0.3.2

func (rt *LoggingRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip satisfies the http.RoundTripper interface. This is where our logging takes place.

Jump to

Keyboard shortcuts

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