dpi

package module
v0.0.0-...-6168240 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2020 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Done = errors.New("done")

Done is returned by a Handler when it considers itself done

Functions

func AutoRun

func AutoRun(cb Handler) error

AutoRun will automatically determine from os.Args[0] whether to run as a filter (*.filter.dpi) or not

func ErrorOf

func ErrorOf(w io.Writer) error

ErrorOf returns the error, if any, of the writer passed to a Handler If the writer is not the one passed to the Handler, nil is returned

func Run

func Run(cb Handler) error

Run starts an endless loop, accepting DPI connections and calling the handler with each new tag

func RunFilter

func RunFilter(cb Handler) error

func Tag

func Tag(w io.Writer, fields map[string]string) error

Types

type Handler

type Handler func(map[string]string, io.Writer) error

Handler is the user provided callback for handling tags The writer passed to the handler by the functions in this package will never return an error

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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