diff options
author | Emiliano Ciavatta | 2020-04-09 10:55:32 +0000 |
---|---|---|
committer | Emiliano Ciavatta | 2020-04-09 10:55:32 +0000 |
commit | 3d2997eb8b80792f09eb984f841c71b907894bcb (patch) | |
tree | 7bf7879ebe3ad72191329b8e607f36368b10a5b7 /stream_handler.go | |
parent | 7ca2f30a0eb21e22071f4e6b04a5207fa273d283 (diff) |
Add FillWithMatchedRules method
Diffstat (limited to 'stream_handler.go')
-rw-r--r-- | stream_handler.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/stream_handler.go b/stream_handler.go index 2d80f60..f2309ad 100644 --- a/stream_handler.go +++ b/stream_handler.go @@ -44,7 +44,7 @@ func NewStreamHandler(connection ConnectionHandler, streamFlow StreamFlow, scann timestamps: make([]time.Time, 0, InitialBlockCount), lossBlocks: make([]bool, 0, InitialBlockCount), documentsIDs: make([]RowID, 0, 1), // most of the time the stream fit in one document - patternMatches: make(map[uint][]PatternSlice, 10), // TODO: change with exactly value + patternMatches: make(map[uint][]PatternSlice, connection.PatternsDatabaseSize()), scanner: scanner, } @@ -127,7 +127,7 @@ func (sh *StreamHandler) resetCurrentDocument() { } } -func (sh *StreamHandler) onMatch(id uint, from uint64, to uint64, flags uint, context interface{}) error { +func (sh *StreamHandler) onMatch(id uint, from uint64, to uint64, _ uint, _ interface{}) error { patternSlices, isPresent := sh.patternMatches[id] if isPresent { if len(patternSlices) > 0 { |