README ¶ syslog-server server for golang package log/syslog and sink to file server 监听 UDP handler 写文件 parser 基于 rfc3164 调用 github.com/jeromer/syslogparser,主要将时间格式设定为 log/syslog 中的 time.RFC3339 Expand ▾ Collapse ▴ Documentation ¶ Index ¶ func ListenUDP(address string, handler Handler) error type Handler type Parser func NewParser(buff []byte) *Parser func (p *Parser) Dump() syslogparser.LogParts func (p *Parser) Hostname(hostname string) func (p *Parser) Location(location *time.Location) func (p *Parser) Parse() error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func ListenUDP ¶ func ListenUDP(address string, handler Handler) error Types ¶ type Handler ¶ type Handler interface { Handle(data map[string]interface{}) } type Parser ¶ type Parser struct { ParsePriority bool // contains filtered or unexported fields } func NewParser ¶ func NewParser(buff []byte) *Parser func (*Parser) Dump ¶ func (p *Parser) Dump() syslogparser.LogParts func (*Parser) Hostname ¶ func (p *Parser) Hostname(hostname string) func (*Parser) Location ¶ func (p *Parser) Location(location *time.Location) func (*Parser) Parse ¶ func (p *Parser) Parse() error Source Files ¶ View all Source files handler.go parser.go server.go Directories ¶ Show internal Expand all Path Synopsis example Click to show internal directories. Click to hide internal directories.