- Copy envd source from e2b-dev/infra, internalize shared dependencies
into envd/internal/shared/ (keys, filesystem, id, smap, utils)
- Switch from gRPC to Connect RPC for all envd services
- Update module paths to git.omukk.dev/wrenn/{sandbox,sandbox/envd}
- Add proto specs (process, filesystem) with buf-based code generation
- Implement full envd: process exec, filesystem ops, port forwarding,
cgroup management, MMDS integration, and HTTP API
- Update main module dependencies (firecracker SDK, pgx, goose, etc.)
- Remove placeholder .gitkeep files replaced by real implementations
29 lines
661 B
Go
29 lines
661 B
Go
package process
|
|
|
|
import (
|
|
"context"
|
|
|
|
"connectrpc.com/connect"
|
|
|
|
"git.omukk.dev/wrenn/sandbox/envd/internal/services/process/handler"
|
|
rpc "git.omukk.dev/wrenn/sandbox/envd/internal/services/spec/process"
|
|
)
|
|
|
|
func (s *Service) List(context.Context, *connect.Request[rpc.ListRequest]) (*connect.Response[rpc.ListResponse], error) {
|
|
processes := make([]*rpc.ProcessInfo, 0)
|
|
|
|
s.processes.Range(func(pid uint32, value *handler.Handler) bool {
|
|
processes = append(processes, &rpc.ProcessInfo{
|
|
Pid: pid,
|
|
Tag: value.Tag,
|
|
Config: value.Config,
|
|
})
|
|
|
|
return true
|
|
})
|
|
|
|
return connect.NewResponse(&rpc.ListResponse{
|
|
Processes: processes,
|
|
}), nil
|
|
}
|