Documentation
¶
Index ¶
Constants ¶
View Source
const NginxTimeLocal = "02/Jan/2006:15:04:05 -0700"
View Source
const TypeNginx = "nginx"
View Source
const TypeNginxAccess = "nginx_access"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IParser ¶
type IParser interface { //Parse 解析一行内容 Parse(line *tail.Line) (map[string]interface{}, *carbon.Carbon) //ParseDirOrFile 解析一个目录 ParseDirOrFile(path string) map[string][]string //ParseFile 解析单个文件 ParseFile(file string) (string, string) }
IParser Parser接口
func NewNginxAccessParser ¶
func NewNginxAccessParser(cfg IParserConfig) IParser
NewNginxAccessParser Nginx文件处理的构造函数
type IParserConfig ¶
IParserConfig Parser所需配置文件接口
type NginxAccessParser ¶
type NginxAccessParser struct { VarNames []string TimeFiled string // contains filtered or unexported fields }
NginxAccessParser NginxAccessLog解析器
func (*NginxAccessParser) ParseDirOrFile ¶
func (n *NginxAccessParser) ParseDirOrFile(path string) map[string][]string
ParseDirOrFile 解析目录或文件中的文件(无递归)
Click to show internal directories.
Click to hide internal directories.