Documentation ¶
Index ¶
- func NewCtrlLogsCommand() *cobra.Command
- func NewRouterLogsCmd() *cobra.Command
- func ScanJsonLines(path string, callback func(ctx *JsonParseContext) error) error
- func ScanLines(ctx *ParseContext, callback func(ctx *ParseContext) error) error
- type AlwaysMatcher
- type AndMatcher
- type ControllerLogs
- type EntryFieldContainsMatcher
- type EntryFieldEqualsMatcher
- type EntryFieldMatchesMatcher
- type EntryFieldStartsWithMatcher
- type EntryHandler
- type JsonLogsParser
- type JsonParseContext
- type LogFilter
- type LogFilterHandler
- type LogMatcher
- func AndMatchers(matchers ...LogMatcher) LogMatcher
- func FieldContains(field, substring string) LogMatcher
- func FieldEquals(field, substring string) LogMatcher
- func FieldMatches(field, expr string) LogMatcher
- func FieldStartsWith(field, substring string) LogMatcher
- func OrMatchers(matchers ...LogMatcher) LogMatcher
- type LogSummaryHandler
- func (self *LogSummaryHandler) HandleEnd(*JsonParseContext)
- func (self *LogSummaryHandler) HandleMatch(ctx *JsonParseContext, logFilter LogFilter) error
- func (self *LogSummaryHandler) HandleNewLine(ctx *JsonParseContext) error
- func (self *LogSummaryHandler) HandleUnmatched(ctx *JsonParseContext) error
- type OrMatcher
- type ParseContext
- type RouterLogs
- type TimePredicate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCtrlLogsCommand ¶
func NewRouterLogsCmd ¶
func ScanJsonLines ¶
func ScanJsonLines(path string, callback func(ctx *JsonParseContext) error) error
func ScanLines ¶
func ScanLines(ctx *ParseContext, callback func(ctx *ParseContext) error) error
Types ¶
type AlwaysMatcher ¶
type AlwaysMatcher struct{}
func (AlwaysMatcher) Matches ¶
func (a AlwaysMatcher) Matches(*JsonParseContext) (bool, error)
type AndMatcher ¶
type AndMatcher struct {
// contains filtered or unexported fields
}
func (*AndMatcher) Matches ¶
func (self *AndMatcher) Matches(ctx *JsonParseContext) (bool, error)
type ControllerLogs ¶ added in v0.1.1
type ControllerLogs struct {
JsonLogsParser
}
func (*ControllerLogs) Init ¶ added in v0.1.1
func (self *ControllerLogs) Init()
type EntryFieldContainsMatcher ¶
type EntryFieldContainsMatcher struct {
// contains filtered or unexported fields
}
func (*EntryFieldContainsMatcher) Matches ¶
func (self *EntryFieldContainsMatcher) Matches(ctx *JsonParseContext) (bool, error)
type EntryFieldEqualsMatcher ¶
type EntryFieldEqualsMatcher struct {
// contains filtered or unexported fields
}
func (*EntryFieldEqualsMatcher) Matches ¶
func (self *EntryFieldEqualsMatcher) Matches(ctx *JsonParseContext) (bool, error)
type EntryFieldMatchesMatcher ¶
type EntryFieldMatchesMatcher struct {
// contains filtered or unexported fields
}
func (*EntryFieldMatchesMatcher) Matches ¶
func (self *EntryFieldMatchesMatcher) Matches(ctx *JsonParseContext) (bool, error)
type EntryFieldStartsWithMatcher ¶
type EntryFieldStartsWithMatcher struct {
// contains filtered or unexported fields
}
func (*EntryFieldStartsWithMatcher) Matches ¶
func (self *EntryFieldStartsWithMatcher) Matches(ctx *JsonParseContext) (bool, error)
type EntryHandler ¶ added in v0.1.1
type EntryHandler interface { HandleEnd(ctx *JsonParseContext) HandleNewLine(ctx *JsonParseContext) error HandleMatch(ctx *JsonParseContext, logFilter LogFilter) error HandleUnmatched(ctx *JsonParseContext) error }
type JsonLogsParser ¶
type JsonLogsParser struct {
// contains filtered or unexported fields
}
func (*JsonLogsParser) ShowCategories ¶
func (self *JsonLogsParser) ShowCategories(*cobra.Command, []string)
type JsonParseContext ¶
type JsonParseContext struct { ParseContext // contains filtered or unexported fields }
func (*JsonParseContext) GetString ¶
func (self *JsonParseContext) GetString(path string) string
func (*JsonParseContext) HandleNonJson ¶ added in v0.1.3
func (self *JsonParseContext) HandleNonJson()
func (*JsonParseContext) ParseJsonEntry ¶
func (self *JsonParseContext) ParseJsonEntry() error
type LogFilter ¶
type LogFilter interface { LogMatcher Id() string Desc() string }
type LogFilterHandler ¶ added in v0.1.1
type LogFilterHandler struct {
// contains filtered or unexported fields
}
func (*LogFilterHandler) HandleEnd ¶ added in v0.1.1
func (self *LogFilterHandler) HandleEnd(*JsonParseContext)
func (*LogFilterHandler) HandleMatch ¶ added in v0.1.1
func (self *LogFilterHandler) HandleMatch(ctx *JsonParseContext, logFilter LogFilter) error
func (*LogFilterHandler) HandleNewLine ¶ added in v0.1.1
func (self *LogFilterHandler) HandleNewLine(ctx *JsonParseContext) error
func (LogFilterHandler) HandleUnmatched ¶ added in v0.1.1
func (self LogFilterHandler) HandleUnmatched(ctx *JsonParseContext) error
type LogMatcher ¶
type LogMatcher interface {
Matches(ctx *JsonParseContext) (bool, error)
}
func AndMatchers ¶
func AndMatchers(matchers ...LogMatcher) LogMatcher
AndMatchers will return a matcher that will match if all the supplied matchers match
func FieldContains ¶
func FieldContains(field, substring string) LogMatcher
func FieldEquals ¶
func FieldEquals(field, substring string) LogMatcher
func FieldMatches ¶
func FieldMatches(field, expr string) LogMatcher
func FieldStartsWith ¶
func FieldStartsWith(field, substring string) LogMatcher
func OrMatchers ¶
func OrMatchers(matchers ...LogMatcher) LogMatcher
OrMatchers will return a matcher that will match if any of the supplied matchers match
type LogSummaryHandler ¶ added in v0.1.1
type LogSummaryHandler struct {
// contains filtered or unexported fields
}
func (*LogSummaryHandler) HandleEnd ¶ added in v0.1.1
func (self *LogSummaryHandler) HandleEnd(*JsonParseContext)
func (*LogSummaryHandler) HandleMatch ¶ added in v0.1.1
func (self *LogSummaryHandler) HandleMatch(ctx *JsonParseContext, logFilter LogFilter) error
func (*LogSummaryHandler) HandleNewLine ¶ added in v0.1.1
func (self *LogSummaryHandler) HandleNewLine(ctx *JsonParseContext) error
func (*LogSummaryHandler) HandleUnmatched ¶ added in v0.1.1
func (self *LogSummaryHandler) HandleUnmatched(ctx *JsonParseContext) error
type ParseContext ¶
type ParseContext struct {
// contains filtered or unexported fields
}
type RouterLogs ¶ added in v0.1.1
type RouterLogs struct {
JsonLogsParser
}
func (*RouterLogs) Init ¶ added in v0.1.1
func (self *RouterLogs) Init()
type TimePredicate ¶
func (TimePredicate) Matches ¶
func (self TimePredicate) Matches(ctx *JsonParseContext) (bool, error)
Click to show internal directories.
Click to hide internal directories.