Documentation ¶
Index ¶
- Constants
- type AggregationFunc
- type Filter
- func (f Filter) And(operands ...genq.FilterFunc[Record]) Filter
- func (f Filter) Attr(key string, value any) Filter
- func (f Filter) Group(fn GroupFunc) Group[string]
- func (f Filter) Message(msg string) Filter
- func (f Filter) Or(operands ...genq.FilterFunc[Record]) Filter
- func (f Filter) Records() Records
- func (f Filter) Resolve() []Record
- func (f Filter) Where(operands ...genq.FilterFunc[Record]) Filter
- type FilterFunc
- type Group
- type GroupFunc
- type Record
- type Records
- type Sink
- type Source
- type Subscriber
Constants ¶
View Source
const ( AttributeFile = "_file" AttributeLine = "_line" AttributeLevel = "_level" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregationFunc ¶
type AggregationFunc = genq.AggregationFunc[Record]
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
func NewFilter ¶
func NewFilter(fn FilterFunc, source Source) Filter
type FilterFunc ¶
type FilterFunc = genq.FilterFunc[Record]
func And ¶
func And(operands ...FilterFunc) FilterFunc
func Attr ¶
func Attr(key string, value any) FilterFunc
func False ¶
func False() FilterFunc
func Message ¶
func Message(message string) FilterFunc
func Not ¶
func Not(fn FilterFunc) FilterFunc
func Or ¶
func Or(operands ...FilterFunc) FilterFunc
func True ¶
func True() FilterFunc
type Group ¶
type Group[K comparable] struct { // contains filtered or unexported fields }
func (Group[K]) Aggregate ¶
func (a Group[K]) Aggregate(fn AggregationFunc) map[K]Record
func (Group[K]) AggregateFlat ¶
func (a Group[K]) AggregateFlat(fn AggregationFunc) Records
type Records ¶
type Records []Record
func (Records) Where ¶
func (r Records) Where(operands ...FilterFunc) Filter
type Sink ¶
type Sink struct {
// contains filtered or unexported fields
}
Sink is a shared store of records.
func NewSink ¶
func NewSink(parent *Sink, filter FilterFunc) *Sink
func (*Sink) Subscribe ¶
func (s *Sink) Subscribe(sub Subscriber) func()
type Subscriber ¶
type Subscriber func(record Record)
Click to show internal directories.
Click to hide internal directories.