本文整理匯總了Golang中github.com/CIRCL/pbtc/adaptor.Record類的典型用法代碼示例。如果您正苦於以下問題:Golang Record類的具體用法?Golang Record怎麽用?Golang Record使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了Record類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: Process
// 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
}
示例2: valid
// 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()]
}
示例3: Process
func (w *FileWriter) Process(record adaptor.Record) {
w.log.Debug("[PWF] Process: %v", record.Command())
w.txtQ <- record.String()
}
示例4: Process
func (w *RedisWriter) Process(record adaptor.Record) {
w.log.Debug("[PWR] Process: %v", record.Command())
w.lineQ <- record.String()
}
示例5: Process
// 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
}
示例6: valid
// valid checks whether a record fulfills the criteria for forwarding.
func (filter *CommandFilter) valid(record adaptor.Record) bool {
return filter.config[record.Command()]
}