samples

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMyParser

func NewMyParser(c conf.MapConf) (parser.Parser, 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 []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 []Data) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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