Fix the request-response matcher maps iteration in clean() method and share the streams map with the TLS tapper (#1059)

* Fix `panic: interface conversion: api.RequestResponseMatcher is nil, not *http.requestResponseMatcher` error

Also fix the request-response matcher maps iteration in `clean()` method.

* Fix the mocks in the unit tests

* Remove unnecessary fields from `tlsPoller` and implement `SetProtocol` method

* Use concrete types in `tap` package

* Share the streams map with the TLS tapper

* Check interface conversion error
This commit is contained in:
M. Mert Yıldıran
2022-05-01 06:16:22 -07:00
committed by GitHub
parent 0881dad17f
commit 1de50b0572
15 changed files with 73 additions and 57 deletions

View File

@@ -426,7 +426,7 @@ type TcpStream interface {
SetProtocol(protocol *Protocol)
GetOrigin() Capture
GetProtoIdentifier() *ProtoIdentifier
GetReqResMatcher() RequestResponseMatcher
GetReqResMatchers() []RequestResponseMatcher
GetIsTapTarget() bool
GetIsClosed() bool
}