iop/proto/iop/control.proto

96 lines
2.8 KiB
Protocol Buffer

syntax = "proto3";
package iop;
import "proto/iop/runtime.proto";
option go_package = "iop/proto/gen/iop";
// PolicyRule is a placeholder for future edge-level routing/resource constraints.
message PolicyRule {
string name = 1;
string expression = 2;
map<string, string> params = 3;
}
// ScheduleRequest is a legacy placeholder for future Control Plane orchestration.
// It must not be treated as an active contract for direct Node scheduling.
message ScheduleRequest {
string job_id = 1;
string target = 2;
repeated PolicyRule policies = 3;
map<string, string> metadata = 4;
}
// ScheduleResponse is a legacy placeholder. Future scheduling should be
// reworked around Edge-owned runtime state instead of bypassing Edge.
message ScheduleResponse {
string node_id = 1;
string address = 2;
string token = 3;
}
message ClientHelloRequest {
string client_id = 1;
string client_version = 2;
}
message ClientHelloResponse {
bool ready = 1;
string protocol = 2;
int64 server_time_unix_nano = 3;
string message = 4;
}
// EdgeHelloRequest is sent by Edge to Control Plane immediately after a
// Control Plane-Edge wire connection is established. It describes the Edge
// itself and must not become a direct Node registration or scheduling contract.
message EdgeHelloRequest {
string edge_id = 1;
string edge_name = 2;
string version = 3;
repeated string capabilities = 4;
map<string, string> metadata = 5;
}
// EdgeHelloResponse acknowledges Edge enrollment on the Control Plane-Edge
// wire. Rejection details stay at the Edge boundary rather than exposing Node
// scheduling decisions.
message EdgeHelloResponse {
bool accepted = 1;
string protocol = 2;
int64 server_time_unix_nano = 3;
string message = 4;
string reason = 5;
}
// EdgeStatusRequest asks a connected Edge to report its Edge-owned node
// registry snapshot. It carries only a correlation id; the Control Plane does
// not address, connect to, or schedule Node directly through this contract.
message EdgeStatusRequest {
string request_id = 1;
}
// EdgeNodeSnapshot is a surface-neutral view of a node owned by the Edge. It
// only mirrors what the Edge service exposes and must not carry Node address,
// token, or scheduling fields.
message EdgeNodeSnapshot {
string node_id = 1;
string alias = 2;
string label = 3;
bool connected = 4;
NodeConfigPayload config = 5;
}
// EdgeStatusResponse returns the Edge-owned node snapshot list in reply to an
// EdgeStatusRequest. The Control Plane observes this snapshot rather than
// replicating the Edge-local registry.
message EdgeStatusResponse {
string request_id = 1;
string edge_id = 2;
string edge_name = 3;
int64 observed_time_unix_nano = 4;
repeated EdgeNodeSnapshot nodes = 5;
map<string, string> metadata = 6;
string error = 7;
}