Documentation ¶
Index ¶
- Variables
- func ParseReq(req string) (string, string, string)
- func StringTimeEqual(l string, r time.Time) bool
- func StringTimeGreaterThan(l string, r time.Time) bool
- func StringTimeGreaterThanEqual(l string, r time.Time) bool
- func StringTimeLessThan(l string, r time.Time) bool
- func StringTimeLessThanEqual(l string, r time.Time) bool
- func StringTimeNotEqual(l string, r time.Time) bool
- func TimeStringEqual(l time.Time, r string) bool
- func TimeStringGreaterThan(l time.Time, r string) bool
- func TimeStringGreaterThanEqual(l time.Time, r string) bool
- func TimeStringLessThan(l time.Time, r string) bool
- func TimeStringLessThanEqual(l time.Time, r string) bool
- func TimeStringNotEqual(l time.Time, r string) bool
- type ExprEnv
- type FilterExpr
- type LTSVReadOpt
- type LTSVReader
- type LogEntry
Constants ¶
This section is empty.
Variables ¶
View Source
var Filtered = errors.New("filtered")
Functions ¶
func StringTimeGreaterThanEqual ¶ added in v1.9.0
func StringTimeLessThanEqual ¶ added in v1.9.0
func TimeStringGreaterThanEqual ¶ added in v1.9.0
func TimeStringLessThanEqual ¶ added in v1.9.0
Types ¶
type ExprEnv ¶ added in v1.9.0
type ExprEnv struct { Req string `expr:"req"` Method string `expr:"method"` Uri string `expr:"uri"` Status int `expr:"status"` Time time.Time `expr:"time"` Uid string `expr:"uid"` SetNewUid bool `expr:"setNewUid"` TimeStringEqual func(l time.Time, r string) bool TimeStringNotEqual func(l time.Time, r string) bool TimeStringGreaterThan func(l time.Time, r string) bool TimeStringGreaterThanEqual func(l time.Time, r string) bool TimeStringLessThan func(l time.Time, r string) bool TimeStringLessThanEqual func(l time.Time, r string) bool StringTimeEqual func(l string, r time.Time) bool StringTimeNotEqual func(l string, r time.Time) bool StringTimeGreaterThan func(l string, r time.Time) bool StringTimeGreaterThanEqual func(l string, r time.Time) bool StringTimeLessThan func(l string, r time.Time) bool StringTimeLessThanEqual func(l string, r time.Time) bool }
type FilterExpr ¶ added in v1.9.0
type FilterExpr struct {
// contains filtered or unexported fields
}
func NewFilterExpr ¶ added in v1.9.0
func NewFilterExpr(code string) (*FilterExpr, error)
type LTSVReadOpt ¶
type LTSVReader ¶
type LTSVReader struct {
// contains filtered or unexported fields
}
func NewLTSVReader ¶
func NewLTSVReader(r io.Reader, opt LTSVReadOpt) (*LTSVReader, error)
func (*LTSVReader) Parse ¶
func (r *LTSVReader) Parse(entry *LogEntry) (*LogEntry, error)
Parse parses one line of log file into LogEntry struct For reducing memory allocation, you can pass a LogEntry to record to reuse the given one.
func (*LTSVReader) Read ¶
func (r *LTSVReader) Read() bool
Click to show internal directories.
Click to hide internal directories.