mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-09-06 04:52:39 +00:00
Remove unused fields from tlsPoller
This commit is contained in:
@@ -30,12 +30,9 @@ type tlsPoller struct {
|
||||
extension *api.Extension
|
||||
procfs string
|
||||
pidToNamespace sync.Map
|
||||
id int64
|
||||
isClosed bool
|
||||
protoIdentifier *api.ProtoIdentifier
|
||||
isTapTarget bool
|
||||
clients []api.TcpReader
|
||||
servers []api.TcpReader
|
||||
origin api.Capture
|
||||
createdAt time.Time
|
||||
}
|
||||
@@ -144,6 +141,7 @@ func (p *tlsPoller) handleTlsChunk(chunk *tlsChunk, extension *api.Extension,
|
||||
func(r *tlsReader) {
|
||||
p.closeReader(key, r)
|
||||
},
|
||||
chunk.IsRequest(),
|
||||
p,
|
||||
)
|
||||
|
||||
@@ -279,7 +277,9 @@ func (p *tlsPoller) logTls(chunk *tlsChunk, ip net.IP, port uint16) {
|
||||
chunk.Recorded, chunk.Len, chunk.Start, str, hex.EncodeToString(chunk.Data[0:chunk.Recorded]))
|
||||
}
|
||||
|
||||
func (p *tlsPoller) Close() {}
|
||||
func (p *tlsPoller) Close() {
|
||||
// TODO: Implement
|
||||
}
|
||||
|
||||
func (p *tlsPoller) CloseOtherProtocolDissectors(protocol *api.Protocol) {
|
||||
// TODO: Implement
|
||||
@@ -290,19 +290,19 @@ func (p *tlsPoller) AddClient(reader api.TcpReader) {}
|
||||
func (p *tlsPoller) AddServer(reader api.TcpReader) {}
|
||||
|
||||
func (p *tlsPoller) GetClients() []api.TcpReader {
|
||||
return p.clients
|
||||
return []api.TcpReader{}
|
||||
}
|
||||
|
||||
func (p *tlsPoller) GetServers() []api.TcpReader {
|
||||
return p.servers
|
||||
return []api.TcpReader{}
|
||||
}
|
||||
|
||||
func (p *tlsPoller) GetClient(index int) api.TcpReader {
|
||||
return p.clients[index]
|
||||
return &tlsReader{}
|
||||
}
|
||||
|
||||
func (p *tlsPoller) GetServer(index int) api.TcpReader {
|
||||
return p.servers[index]
|
||||
return &tlsReader{}
|
||||
}
|
||||
|
||||
func (p *tlsPoller) GetOrigin() api.Capture {
|
||||
@@ -326,9 +326,7 @@ func (p *tlsPoller) GetIsClosed() bool {
|
||||
}
|
||||
|
||||
func (p *tlsPoller) GetId() int64 {
|
||||
return p.id
|
||||
return 0
|
||||
}
|
||||
|
||||
func (p *tlsPoller) SetId(id int64) {
|
||||
p.id = id
|
||||
}
|
||||
func (p *tlsPoller) SetId(id int64) {}
|
||||
|
@@ -26,7 +26,7 @@ type tlsReader struct {
|
||||
reqResMatcher api.RequestResponseMatcher
|
||||
}
|
||||
|
||||
func NewTlsReader(key string, doneHandler func(r *tlsReader), stream api.TcpStream) api.TcpReader {
|
||||
func NewTlsReader(key string, doneHandler func(r *tlsReader), isClient bool, stream api.TcpStream) api.TcpReader {
|
||||
return &tlsReader{
|
||||
key: key,
|
||||
chunks: make(chan api.TlsChunk, 1),
|
||||
|
Reference in New Issue
Block a user