Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Counter is an instance of a [pageName]pageView hash map. This is implemented with a mutex RW lock for concurrent R/W safety
IPs is an instance of a [ipAdress]bool hash map. hash offers a easy implementation of a set with quick insertion. This is implemented with a mutex RW lock for concurrent R/W safety
View Source
var SaveDuration = time.Minute * 1
RefreshTime is how often the page views and IPs are saved to disk, set at a default of 1 minute
Functions ¶
func DeletePage ¶
func DeletePage(page string)
DeletePage deletes the page and its views from the counter
func GetNumberOfUniqueIPs ¶
GetNumberOfUniqueIPs returns the number of unique IPs
func GetPageViews ¶
GetPageViews returns a boolean to indicate if a page is present in the counter. If it is it also returns the count, else count = 0
Types ¶
Click to show internal directories.
Click to hide internal directories.