Skip to content

Commit

Permalink
more changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mastermanu committed Mar 12, 2024
1 parent a344890 commit ca41698
Show file tree
Hide file tree
Showing 3 changed files with 168 additions and 0 deletions.
92 changes: 92 additions & 0 deletions temporal/api/cloud/cloudservice/v1/request_response.proto
Original file line number Diff line number Diff line change
Expand Up @@ -316,3 +316,95 @@ message DeleteIncomingServiceResponse {
// The async operation
temporal.api.cloud.operation.v1.AsyncOperation async_operation = 1;
}

message GetOutgoingServicesRequest {
// The namespace to get all the outgoing services from
string namespace = 1;

// The requested size of the page to retrieve - optional.
// Cannot exceed 1000. Defaults to 100.
int32 page_size = 2;

// The page token if this is continuing from another response - optional.
string page_token = 3;
}

message GetOutgoingServicesResponse {
// The list of outgoing services in ascending name order
repeated temporal.api.cloud.nexus.v1.OutgoingService outgoing_services = 1;

// The next page's token
string next_page_token = 2;
}

message GetOutgoingServiceRequest {
// The name of the namespace the outgoing service is registered on
string namespace = 1;

// The name of the outgoing service
string name = 2;
}

message GetOutgoingServiceResponse {
// The outgoing service
temporal.api.cloud.nexus.v1.OutgoingService outgoing_service = 1;
}

message CreateOutgoingServiceRequest {
// The namespace to register this outgoing service request on
string namespace = 1;

// The spec for the outgoing service
temporal.api.cloud.nexus.v1.OutgoingServiceSpec spec = 2;

// The id to use for this async operation - optional
string async_operation_id = 3;
}

message CreateOutgoingServiceResponse {
// The async operation
temporal.api.cloud.operation.v1.AsyncOperation async_operation = 1;
}

message UpdateOutgoingServiceRequest {
// The name of the namespace the outgoing service is registered on
string namespace = 1;

// The name of the outgoing service to update
string name = 2;

// The updated outcoming service specification
temporal.api.cloud.nexus.v1.OutgoingServiceSpec spec = 3;

// The version of the outgoing service for which this update is intended for
// The latest version can be found in the GetOutgoingService operation response
string resource_version = 4;

// The id to use for this async operation - optional
string async_operation_id = 5;
}

message UpdateOutgoingServiceResponse {
// The async operation
temporal.api.cloud.operation.v1.AsyncOperation async_operation = 1;
}

message DeleteOutgoingServiceRequest {
// The id of the namespace to remove the outgoing service from
string namespace = 1;

// The name outcoming service to delete
string name = 2;

// The version of the outcoming service for which this delete is intended for
// The latest version can be found in the GetOutgoingService operation response
string resource_version = 3;

// The id to use for this async operation - optional
string async_operation_id = 4;
}

message DeleteOutgoingServiceResponse {
// The async operation
temporal.api.cloud.operation.v1.AsyncOperation async_operation = 1;
}
37 changes: 37 additions & 0 deletions temporal/api/cloud/cloudservice/v1/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,41 @@ service CloudService {
delete: "/api/v1/nexus/incomingservices/{incoming_service_id}",
};
}

// Gets all known nexus outgoing services for a given namespace
rpc GetOutgoingServices(GetOutgoingServicesRequest) returns (GetOutgoingServicesResponse) {
option (google.api.http) = {
get: "/api/v1/namespaces/{namespace}/nexus/outgoingservices",
};
}

// Get an outgoing service
rpc GetOutgoingService(GetOutgoingServiceRequest) returns (GetOutgoingServiceResponse) {
option (google.api.http) = {
get: "/api/v1/namespaces/{namespace}/nexus/outgoingservices/{name}",
};
}

// Create an outgoing service
rpc CreateOutgoingService(CreateOutgoingServiceRequest) returns (CreateOutgoingServiceResponse) {
option (google.api.http) = {
post: "/api/v1/namespaces/{namespace}/nexus/outgoingservices",
body: "*"
};
}

// Update an outgoing service
rpc UpdateOutgoingService(UpdateOutgoingServiceRequest) returns (UpdateOutgoingServiceResponse) {
option (google.api.http) = {
post: "/api/v1/namespaces/{namespace}/nexus/outgoingservices/{name}",
body: "*"
};
}

// Delete an outgoing service
rpc DeleteOutgoingService(DeleteOutgoingServiceRequest) returns (DeleteOutgoingServiceResponse) {
option (google.api.http) = {
delete: "/api/v1/namespaces/{namespace}/nexus/outgoingservices/{name}",
};
}
}
39 changes: 39 additions & 0 deletions temporal/api/cloud/nexus/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,42 @@ message IncomingService {
google.protobuf.Timestamp last_modified_time = 7;
}

message OutgoingServiceSpec {
// The name of the outgoing service. Must be unique within the namespace
// The name must match `[a-zA-Z_][a-zA-Z0-9_]*`.
// This name is immutable
string name = 1;

BindingSpec binding = 2;
}

message BindingSpec {
string incoming_service_id = 1;
}

// A per-namespace binding from service name to destination service to invoke Nexus requests
// that are initiated by workflows.
message OutgoingService {
// The name of the outgoing service.
string name = 1;

// The current version of the incoming service specification
// The next update operation must include this version
string resource_version = 2;

// The incoming service specification
OutgoingServiceSpec spec = 3;

// The current state of the service
string state = 4;

// The id of the async operation that is creating/updating/deleting the service, if any
string async_operation_id = 5;

// The date and time when the service was created
google.protobuf.Timestamp created_time = 6;

// The date and time when the service was last modified
// Will not be set if the service has never been modified.
google.protobuf.Timestamp last_modified_time = 7;
}

0 comments on commit ca41698

Please sign in to comment.