mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-06-23 14:58:44 +00:00
* 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
33 lines
664 B
Go
33 lines
664 B
Go
package tlstapper
|
|
|
|
import "github.com/up9inc/mizu/tap/api"
|
|
|
|
type tlsStream struct {
|
|
reader *tlsReader
|
|
protoIdentifier *api.ProtoIdentifier
|
|
}
|
|
|
|
func (t *tlsStream) GetOrigin() api.Capture {
|
|
return api.Ebpf
|
|
}
|
|
|
|
func (t *tlsStream) GetProtoIdentifier() *api.ProtoIdentifier {
|
|
return t.protoIdentifier
|
|
}
|
|
|
|
func (t *tlsStream) SetProtocol(protocol *api.Protocol) {
|
|
t.protoIdentifier.Protocol = protocol
|
|
}
|
|
|
|
func (t *tlsStream) GetReqResMatchers() []api.RequestResponseMatcher {
|
|
return []api.RequestResponseMatcher{t.reader.reqResMatcher}
|
|
}
|
|
|
|
func (t *tlsStream) GetIsTapTarget() bool {
|
|
return true
|
|
}
|
|
|
|
func (t *tlsStream) GetIsClosed() bool {
|
|
return false
|
|
}
|