Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPromCounter ¶ added in v1.8.0
func GetPromCounter(config map[interface{}]interface{}) prometheus.Counter
GetPromCounter creates a prometheus.Counter from config. if same config exsits before, GetPromCounter would return the counter created before. Because tow counters with the same config leads to panic. Better practice maybe to let it panic, so owner can fix the config when program fails to start. But if user use multi workers to run gohangout, panic are bound to happen, this is bad. So we use a manager to return one counter with save config. Better way is to add {worker: idx} to ConstLabels, but it is too hard to implement it by code.
Types ¶
type FilterBox ¶
type FilterBox struct { Filter Filter // contains filtered or unexported fields }
func BuildFilterBoxes ¶
func NewFilterBox ¶
func NewFilterBox(config map[interface{}]interface{}) *FilterBox
func (*FilterBox) PostProcess ¶
type NilProcessorInLink ¶
type NilProcessorInLink struct{}
func (*NilProcessorInLink) Process ¶
func (n *NilProcessorInLink) Process(event map[string]interface{}) map[string]interface{}
type OutputBox ¶
type OutputBox struct { Output *condition_filter.ConditionFilter // contains filtered or unexported fields }
func BuildOutputs ¶
type OutputsProcessor ¶
type OutputsProcessor []*OutputBox
func (OutputsProcessor) Process ¶
func (p OutputsProcessor) Process(event map[string]interface{}) map[string]interface{}
Process implement Processor interface
type ProcessorNode ¶
type ProcessorNode struct { Processor Processor Next *ProcessorNode }
ProcessorNode is a node in the filter/output link
func AppendProcessorsToLink ¶
func AppendProcessorsToLink(head *ProcessorNode, processors ...Processor) *ProcessorNode
AppendProcessorsToLink add new processors to tail, return head node
func (*ProcessorNode) Process ¶
func (node *ProcessorNode) Process(event map[string]interface{}) map[string]interface{}
Processor will process event , and pass it to next, and then next , until last one(generally output)