erfserver

package module
v0.0.0-...-2d0ab56 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2018 License: MIT Imports: 4 Imported by: 0

README

erfserver

Build Status Coverage Status GoDoc

Example implementation of ephemeral random fingerprint storage and parsing. This library stores fingerprints in an in-memory graph, for later analysis.

See erftesting for an example project that uses this server library and the corresponding client library.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ERFServer

type ERFServer interface {
	// Append adds an operation to a log
	Append(token []byte, operation string, time time.Time) error

	// TotalClients returns the number of distinct clients seen
	TotalClients() int

	// RecentClients returns the number of clients with operations recorded after (or equal) to since
	RecentClients(since time.Time) int

	// OperationsByClient returns a map of canonical client IDs, with a sub-map with a count of operations.
	OperationsByClient() map[string]map[string]int
}

ERFServer registers client operations and indicates the number of unique clients in use.

func NewInMemory

func NewInMemory() ERFServer

NewInMemory creates an ERFServer that stores records in a simple in-memory array.

Jump to

Keyboard shortcuts

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