mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-08-27 12:58:59 +00:00
Set the extension name inside the extension
This commit is contained in:
parent
5c0a7d907a
commit
5ce85f4162
@ -14,7 +14,7 @@ func init() {
|
||||
type dissecting string
|
||||
|
||||
func (g dissecting) Register(extension *api.Extension) {
|
||||
fmt.Printf("extension: %v\n", extension)
|
||||
extension.Name = "amqp"
|
||||
extension.Ports = []string{"5671", "5672"}
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@ func init() {
|
||||
type dissecting string
|
||||
|
||||
func (g dissecting) Register(extension *api.Extension) {
|
||||
fmt.Printf("extension: %v\n", extension)
|
||||
extension.Name = "http"
|
||||
extension.Ports = []string{"80", "8080", "443"}
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@ func init() {
|
||||
type dissecting string
|
||||
|
||||
func (g dissecting) Register(extension *api.Extension) {
|
||||
fmt.Printf("extension: %v\n", extension)
|
||||
extension.Name = "kafka"
|
||||
extension.Ports = []string{"9092"}
|
||||
}
|
||||
|
||||
|
@ -254,7 +254,6 @@ func loadExtensions() {
|
||||
filename := file.Name()
|
||||
log.Printf("Loading extension: %s\n", filename)
|
||||
extension := &api.Extension{
|
||||
Name: strings.TrimSuffix(filename, filepath.Ext(filename)),
|
||||
Path: path.Join(extensionsDir, filename),
|
||||
}
|
||||
plug, _ := plugin.Open(extension.Path)
|
||||
@ -265,7 +264,7 @@ func loadExtensions() {
|
||||
dissector, _ = symDissector.(api.Dissector)
|
||||
dissector.Register(extension)
|
||||
extension.Dissector = dissector
|
||||
fmt.Printf("returned extension: %v\n", extension)
|
||||
log.Printf("Extension Properties: %+v\n", extension)
|
||||
extensions[i] = extension
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user