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.
Click to show internal directories.
Click to hide internal directories.