Skip to content

Commit cc0afc5

Browse files
committed
fix(proto): align informer ProcessState widths with service.v1.Status; correct TCP PHP namespace
- informer/v1.ProcessState.pid: int64 → int32 (POSIX, matches service.v1.Status.pid) - informer/v1.ProcessState.cpu_percent: double → float (matches service.v1.Status.cpu_percent) - tcp/v1 PHP namespace: RoadRunner\Tcp → RoadRunner\TCP (matches HTTP/KV convention) Surfaced by Copilot review on PR #74.
1 parent 137d5aa commit cc0afc5

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

roadrunner/api/informer/v1/service.proto

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@ option php_metadata_namespace = "RoadRunner\\Informer\\DTO\\V1\\GPBMetadata";
77
option php_namespace = "RoadRunner\\Informer\\DTO\\V1";
88

99
// ProcessState mirrors github.com/roadrunner-server/pool/v2/state/process.State —
10-
// one entry per OS-level worker process managed by a plugin.
10+
// one entry per OS-level worker process managed by a plugin. Field widths match
11+
// the existing service.v1.Status convention (int32 pid, float cpu_percent)
12+
// rather than the Go-source int64/float64; PIDs fit in int32 per POSIX, and a
13+
// percentage value comfortably fits in float32.
1114
message ProcessState {
12-
int64 pid = 1;
15+
int32 pid = 1;
1316
int64 status = 2;
1417
uint64 num_execs = 3;
1518
int64 created = 4;
1619
uint64 memory_usage = 5;
17-
double cpu_percent = 6;
20+
float cpu_percent = 6;
1821
string command = 7;
1922
string status_str = 8;
2023
}

roadrunner/api/tcp/v1/service.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ syntax = "proto3";
33
package tcp.v1;
44

55
option go_package = "github.com/roadrunner-server/api-go/v6/tcp/v1;tcpV1";
6-
option php_metadata_namespace = "RoadRunner\\Tcp\\DTO\\V1\\GPBMetadata";
7-
option php_namespace = "RoadRunner\\Tcp\\DTO\\V1";
6+
option php_metadata_namespace = "RoadRunner\\TCP\\DTO\\V1\\GPBMetadata";
7+
option php_namespace = "RoadRunner\\TCP\\DTO\\V1";
88

99
message CloseRequest {
1010
string uuid = 1;

0 commit comments

Comments
 (0)