mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-07-25 13:43:01 +00:00
Remove unused GetEntry
method, DataUnmarshaler
struct and UnmarshalData
method
This commit is contained in:
parent
b1b7462427
commit
0d4c65d19e
@ -12,10 +12,6 @@ import (
|
|||||||
"github.com/up9inc/mizu/tap"
|
"github.com/up9inc/mizu/tap"
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetEntry(r *tapApi.Entry, v tapApi.DataUnmarshaler) error {
|
|
||||||
return v.UnmarshalData(r)
|
|
||||||
}
|
|
||||||
|
|
||||||
type TapConfig struct {
|
type TapConfig struct {
|
||||||
TappedNamespaces map[string]bool `json:"tappedNamespaces"`
|
TappedNamespaces map[string]bool `json:"tappedNamespaces"`
|
||||||
}
|
}
|
||||||
|
@ -188,21 +188,6 @@ type Contract struct {
|
|||||||
Content string `json:"content"`
|
Content string `json:"content"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type DataUnmarshaler interface {
|
|
||||||
UnmarshalData(*Entry) error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (bed *BaseEntry) UnmarshalData(entry *Entry) error {
|
|
||||||
bed.Protocol = entry.Protocol
|
|
||||||
bed.Id = entry.Id
|
|
||||||
bed.Timestamp = entry.Timestamp
|
|
||||||
bed.Source = entry.Source
|
|
||||||
bed.Destination = entry.Destination
|
|
||||||
bed.Latency = entry.ElapsedTime
|
|
||||||
bed.ContractStatus = entry.ContractStatus
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
const (
|
const (
|
||||||
TABLE string = "table"
|
TABLE string = "table"
|
||||||
BODY string = "body"
|
BODY string = "body"
|
||||||
|
Loading…
Reference in New Issue
Block a user