Documentation
¶
Overview ¶
server implements the web server
Index ¶
- Variables
- func FetchRemotePeer(rawurl, ip string) (rm *meshSrv, err error)
- func Hhmmss(secs int64) string
- func Hhmmss_d(d time.Time) string
- func JitterPct(secs, pct int) time.Duration
- func NewPingmeshServer(myLoc, hostname string, port, report int, cwFlag bool, ...) *meshSrv
- func PingmeshServer() *meshSrv
- type MemStatSummary
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 Hhmmss ¶
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
Hhmmss_d returns a representation of a duration in the format of Hhmmss
func JitterPct ¶ added in v0.2.3
//
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
Click to show internal directories.
Click to hide internal directories.