mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-08-05 10:41:36 +00:00
* Call `SetProtocol` in AMQP faster and remove `GetProtocol` method * #run_acceptance_tests * Remove the unused fields from the test mocks #run_acceptance_tests
40 lines
680 B
Go
40 lines
680 B
Go
package kafka
|
|
|
|
import (
|
|
"sync"
|
|
|
|
"github.com/up9inc/mizu/tap/api"
|
|
)
|
|
|
|
type tcpStream struct {
|
|
isClosed bool
|
|
isTapTarget bool
|
|
origin api.Capture
|
|
reqResMatchers []api.RequestResponseMatcher
|
|
sync.Mutex
|
|
}
|
|
|
|
func NewTcpStream(capture api.Capture) api.TcpStream {
|
|
return &tcpStream{
|
|
origin: capture,
|
|
}
|
|
}
|
|
|
|
func (t *tcpStream) SetProtocol(protocol *api.Protocol) {}
|
|
|
|
func (t *tcpStream) GetOrigin() api.Capture {
|
|
return t.origin
|
|
}
|
|
|
|
func (t *tcpStream) GetReqResMatchers() []api.RequestResponseMatcher {
|
|
return t.reqResMatchers
|
|
}
|
|
|
|
func (t *tcpStream) GetIsTapTarget() bool {
|
|
return t.isTapTarget
|
|
}
|
|
|
|
func (t *tcpStream) GetIsClosed() bool {
|
|
return t.isClosed
|
|
}
|