Skip to content

Commit

Permalink
fix(plugins/gcpaudit): check open params.
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Di Pierro <[email protected]>
  • Loading branch information
FedeDP committed Sep 19, 2023
1 parent 573df5a commit e32522b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/gcpaudit/pkg/gcpaudit/gcpaudit.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ func (p *Plugin) Info() *plugins.Info {
}

func (p *Plugin) Open(params string) (source.Instance, error) {
if params == "" {
return nil, fmt.Errorf("no subscriptionID provided")
}

subscriptionID := params
ctx, cancel := context.WithCancel(context.Background())
eventsC, errC := p.pullMsgsSync(ctx, subscriptionID)
Expand Down

0 comments on commit e32522b

Please sign in to comment.