counter

package
v3.2.13-1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCounterAdapter

func NewCounterAdapter(_ *router.Route) (router.LogAdapter, error)

Types

type Adapter

type Adapter struct {
	Config Config
	Count  func(msg string, level string)
}

func (*Adapter) Stream

func (a *Adapter) Stream(logstream chan *router.Message)

Simple adapter implementation.

type Config

type Config struct {
	Counters map[string]Counter
}

type Counter

type Counter struct {
	Match string
	Level string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL