// Process will add a record to the queue of records to be processed. func (filter *IPFilter) Process(record adaptor.Record) { filter.log.Debug("[PFI] Process: %v", record.Command()) filter.recordQ <- record }
// valid for dummy filter simply returns true for every record func (filter *IPFilter) valid(record adaptor.Record) bool { return filter.config[record.RemoteAddress().IP.String()] }
func (w *FileWriter) Process(record adaptor.Record) { w.log.Debug("[PWF] Process: %v", record.Command()) w.txtQ <- record.String() }
func (w *RedisWriter) Process(record adaptor.Record) { w.log.Debug("[PWR] Process: %v", record.Command()) w.lineQ <- record.String() }
// Process adds one messages to the filter for processing and forwarding. func (filter *AddressFilter) Process(record adaptor.Record) { filter.log.Debug("[PFA] PRocess: %v", record.Command()) filter.recordQ <- record }
// valid checks whether a record fulfills the criteria for forwarding. func (filter *CommandFilter) valid(record adaptor.Record) bool { return filter.config[record.Command()] }