samples

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2017 License: Apache-2.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMyParser

func NewMyParser(c conf.MapConf) (parser.LogParser, error)

func NewMySender

func NewMySender(c conf.MapConf) (sender.Sender, error)

Types

type CustomParser

type CustomParser struct {
	// contains filtered or unexported fields
}

一个自定义parser的示例,将日志放到data中的log字段中

func (*CustomParser) Name

func (p *CustomParser) Name() string

func (*CustomParser) Parse

func (p *CustomParser) Parse(lines []string) (datas []sender.Data, err error)

type CustomSender

type CustomSender struct {
	// contains filtered or unexported fields
}

CustomSender 仅作为示例,什么都不做,只是把数据打印出来而已

func (*CustomSender) Close

func (c *CustomSender) Close() error

func (*CustomSender) Name

func (c *CustomSender) Name() string

func (*CustomSender) Send

func (c *CustomSender) Send(datas []sender.Data) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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