Path: blob/main/components/ee/agent-smith/pkg/detector/discovery.go
2501 views
// Copyright (c) 2022 Gitpod GmbH. All rights reserved.1// Licensed under the GNU Affero General Public License (AGPL).2// See License.AGPL.txt in the project root for license information.34package detector56import (7"context"89"github.com/gitpod-io/gitpod/agent-smith/pkg/common"10"github.com/prometheus/client_golang/prometheus"11)1213// Process describes a process ont the node that might warant closer inspection14type Process struct {15Path string16CommandLine []string17Kind ProcessKind18Workspace *common.Workspace19}2021// ProcessDetector discovers processes on the node22type ProcessDetector interface {23prometheus.Collector2425// Discover starts the discovery process. The discovery process can send the same26// process multiple times.27DiscoverProcesses(ctx context.Context) (<-chan Process, error)28}2930type ProcessKind int3132const (33ProcessUnknown ProcessKind = iota34ProcessSandbox35ProcessSupervisor36ProcessUserWorkload37)383940