server

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

server implements the web server

Index

Constants

This section is empty.

Variables

View Source
var (
	PeerAlreadyPresent = errors.New("Peer already present in peers list")
)

Functions

func FetchRemotePeer added in v0.4.2

func FetchRemotePeer(rawurl, ip string) (rm *meshSrv, err error)

func Hhmmss

func Hhmmss(secs int64) string

Hhmmss returns a representation of the number of seconds (secs) like 01h15m22s (leaving off 00h and 00h00m if they are zero).

func Hhmmss_d added in v0.4.2

func Hhmmss_d(d time.Time) string

Hhmmss_d returns a representation of a duration in the format of Hhmmss

func JitterPct added in v0.2.3

func JitterPct(secs, pct int) time.Duration

//

JitterPct returns a millisecond time.Duration jittered by +/- pct, which
should be between 1 and 100.  The returned duration will never be negative.

func NewPingmeshServer added in v0.2.4

func NewPingmeshServer(myLoc, hostname string, port, report int, cwFlag bool, numTests, pingDelay, maxFail, verbose int) *meshSrv

//

NewPingmeshServer creates a new server instance (only once), assigns its
values from the parameters, sets up HTTP routes, and starts a web server
on the local host:port if configured.

func PingmeshServer

func PingmeshServer() *meshSrv

//

PingmeshServer returns the (already existing) singleton pointer

Types

type MemStatSummary

type MemStatSummary struct {
	Measured time.Time
	Active   uint64 // The number of live objects is Mallocs - Frees.
	AllocMB  uint64 // HeapAlloc is bytes of allocated heap objects.
	SystemMB uint64 // Sys is the total bytes of memory obtained from the OS.
	NumGC    uint32 // NumGC is the number of completed GC cycles.

}

func GetMemStatSummary

func GetMemStatSummary() *MemStatSummary

Jump to

Keyboard shortcuts

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