Skip to content

Commit 078f893

Browse files
authored
Merge pull request #22 from middleware-labs/python-service-discovery
WIP: python service discovery
2 parents e4d70bc + 8befda7 commit 078f893

File tree

4 files changed

+553
-17
lines changed

4 files changed

+553
-17
lines changed

pkg/discovery/discovery.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,17 @@ func FindAllNodeProcesses(ctx context.Context) ([]NodeProcess, error) {
228228
return discoverer.DiscoverNodeWithOptions(ctx, opts)
229229
}
230230

231+
func FindAllPythonProcess(ctx context.Context) ([]PythonProcess, error) {
232+
opts := DefaultDiscoveryOptions()
233+
opts.ExcludeContainers = false
234+
opts.IncludeContainerInfo = true
235+
236+
discoverer := NewDiscoverer(ctx, opts)
237+
defer discoverer.Close()
238+
239+
return discoverer.DiscoverPythonWithOptions(ctx, opts)
240+
}
241+
231242
// FindCurrentUserJavaProcesses discovers Java processes for the current user only
232243
func FindCurrentUserJavaProcesses(ctx context.Context) ([]JavaProcess, error) {
233244
opts := DefaultDiscoveryOptions()

0 commit comments

Comments
 (0)