2020-01-23 18:01:56 +01:00
|
|
|
package logparser
|
2020-01-24 12:00:49 +01:00
|
|
|
|
2020-01-28 10:48:19 +01:00
|
|
|
import "github.com/gomodule/redigo/redis"
|
|
|
|
|
2020-01-24 12:00:49 +01:00
|
|
|
type (
|
|
|
|
// Parser provides the interface for a Parser
|
|
|
|
// It should provide:
|
2020-01-28 10:48:19 +01:00
|
|
|
// Set to assign a redis connection to it
|
2020-01-24 12:00:49 +01:00
|
|
|
// Parse to parse a line of log
|
|
|
|
Parser interface {
|
2020-01-30 17:31:47 +01:00
|
|
|
Set(*redis.Conn, *redis.Conn)
|
2020-01-27 16:07:09 +01:00
|
|
|
Parse(string) error
|
2020-01-30 17:31:47 +01:00
|
|
|
Compile() error
|
2020-01-24 12:00:49 +01:00
|
|
|
}
|
|
|
|
)
|