Skip to content

Commit

Permalink
Merge pull request #3 from LeakIX/init
Browse files Browse the repository at this point in the history
[plugin] Added optional Init() function to plugins
  • Loading branch information
gboddin authored Jun 1, 2021
2 parents e335f9c + ec39523 commit d340f1d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions l9plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,16 @@ type ServicePluginInterface interface {
GetName() string
GetStage() string
Run(ctx context.Context, event *L9Event, options map[string]string) (hasLeak bool)
Init() error
}

type ServicePluginBase struct {
}

func (plugin ServicePluginBase) Init() error {
return nil
}

func (plugin ServicePluginBase) GetL9NetworkConnection(event *L9Event) (conn net.Conn, err error) {
network := "tcp"
if event.HasTransport("udp") {
Expand Down

0 comments on commit d340f1d

Please sign in to comment.