simple_go_http_server: Index | Files

package entryLogsHandler

import ""

Package entryLogsHandler used to keep records slice of struc in pointer, add new records and delete not used records in pointer keep clean Database (.csv file but it can be other backend for example redis etc..)


Package Files


type EntryLog Uses

type EntryLog struct {
    EntryLog []domains.Log

func NewEntryLog Uses

func NewEntryLog() *EntryLog

func (*EntryLog) AddLastRecords Uses

func (logs *EntryLog) AddLastRecords(file string, deltaTime time.Duration, init bool)

AddLastRecords used mostly for control database (in our case simple .csv file), it keep only needed records. 1. It used at spart up (init func) init paramaters must be set TRUE 2. Used as goroutines periodicly cleapUp Database init paramaters must be set FALSE

func (*EntryLog) AddNewHit Uses

func (logs *EntryLog) AddNewHit(logstr string)

AddNewHit add last click click hits in pointer

func (*EntryLog) DeleteExtraRecords Uses

func (logs *EntryLog) DeleteExtraRecords(index int)

DeleteExtraRecords so it delete not used records from slice as well used in goroutines

Package entryLogsHandler imports 6 packages (graph) and is imported by 1 packages. Updated 2016-11-07. Refresh now. Tools for package owners.