Skip to content

Commit c35854b

Browse files
authored
Drop the prose I put in expose.proto (#185)
Documentation belongs in the architecture repo, not in the wire contract. The field and enum comments added with the entity-named exposure change restated what the spec already says -- how a hostname is derived, when it falls back, what an owner resolves to -- and a proto that carries that prose goes stale the moment the spec moves. What stays is structural: the deprecation markers, and the pre-existing rpc comments with "agent workload" corrected to "workload", since a sandbox exposes ports too.
1 parent 5ec14bd commit c35854b

1 file changed

Lines changed: 4 additions & 21 deletions

File tree

proto/agynio/api/expose/v1/expose.proto

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@ option go_package = "github.com/agynio/api/gen/agynio/api/expose/v1;exposev1";
99
// ExposeService manages the lifecycle of port exposures — making ports inside
1010
// a workload accessible over the OpenZiti network.
1111
service ExposeService {
12-
// Expose a port on a workload. Creates OpenZiti resources and returns the
13-
// exposure record (including the access URL). Idempotent per
14-
// (workload_id, port): a port already exposed returns its existing record.
12+
// Expose a port on a workload. Creates OpenZiti resources and returns
13+
// the exposure record (including the access URL).
1514
rpc AddExposure(AddExposureRequest) returns (AddExposureResponse);
1615

17-
// Un-expose a port on a workload. Deletes the OpenZiti resources and the
18-
// exposure record.
16+
// Un-expose a port on a workload. Deletes the OpenZiti resources and
17+
// the exposure record.
1918
rpc RemoveExposure(RemoveExposureRequest) returns (RemoveExposureResponse);
2019

2120
// List active exposures for a workload.
@@ -34,9 +33,6 @@ enum ExposureStatus {
3433
EXPOSURE_STATUS_REMOVING = 4;
3534
}
3635

37-
// What kind of entity the exposing workload runs for. Mirrors
38-
// agynio.api.runners.v1.RuntimeOwnerKind by value; domain packages do not
39-
// import one another.
4036
enum ExposureOwnerKind {
4137
EXPOSURE_OWNER_KIND_UNSPECIFIED = 0;
4238
EXPOSURE_OWNER_KIND_AGENT_INSTANCE = 1;
@@ -60,25 +56,16 @@ message EntityMeta {
6056
message Exposure {
6157
EntityMeta meta = 1;
6258
string workload_id = 2;
63-
// Deprecated: read owner_kind and owner_id instead. Still populated for
64-
// agent-instance-owned exposures; always empty for sandbox-owned ones.
6559
string agent_id = 3 [deprecated = true];
6660
int32 port = 4;
6761
string openziti_service_id = 5;
6862
string openziti_bind_policy_id = 6;
6963
string openziti_dial_policy_id = 7;
70-
// Access URL: http://<hostname>:<port>.
7164
string url = 8;
7265
ExposureStatus status = 9;
7366
ExposureOwnerKind owner_kind = 10;
74-
// Agent instance or sandbox the exposing workload runs for. Names the
75-
// exposure — see the hostname field.
7667
string owner_id = 11;
7768
string organization_id = 12;
78-
// Resolved intercept address, e.g. super-sandbox.acme.agyn. Derived from the
79-
// owner and its organization at creation, re-derived by reconciliation, and
80-
// written into the service's intercept.v1 config. Falls back to
81-
// exposed-<id>.agyn when no readable form can be derived.
8269
string hostname = 13;
8370
}
8471

@@ -87,12 +74,8 @@ message Exposure {
8774
// ===========================================================================
8875

8976
message AddExposureRequest {
90-
// Cluster admins only. Omitted on the standard path, where the workload is
91-
// read from the x-workload-id header the Gateway injects.
9277
string workload_id = 1;
9378
int32 port = 2;
94-
// Deprecated: the owner is resolved from the workload record. Accepted and
95-
// ignored.
9679
string agent_id = 3 [deprecated = true];
9780
}
9881

0 commit comments

Comments
 (0)