Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
alice-yin committed Oct 4, 2024
1 parent 11cb3db commit 9eb1fb3
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 54 deletions.
36 changes: 17 additions & 19 deletions temporal/api/cloud/cloudservice/v1/request_response.proto
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ message GetUsageResponse {
string next_page_token = 2;
}

message CreateExportSinkRequest {
message CreateNamespaceExportSinkRequest {
// The namespace under which the sink is configured.
string namespace = 1;
// The specification for the export sink.
Expand All @@ -663,24 +663,24 @@ message CreateExportSinkRequest {
string async_operation_id = 3;
}

message CreateExportSinkResponse {
message CreateNamespaceExportSinkResponse {
// The async operation.
temporal.api.cloud.operation.v1.AsyncOperation async_operation = 2;
}

message GetExportSinkRequest {
message GetNamespaceExportSinkRequest {
// The namespace to which the sink belongs.
string namespace = 1;
// The name of the sink to retrieve.
string sink_name = 2;
string name = 2;
}

message GetExportSinkResponse {
message GetNamespaceExportSinkResponse {
// The export sink retrieved.
temporal.api.cloud.sink.v1.ExportSink sink = 1;
}

message GetExportSinksRequest {
message GetNamespaceExportSinksRequest {
// The namespace to which the sinks belong.
string namespace = 1;
// The requested size of the page to retrieve. Cannot exceed 1000.
Expand All @@ -690,58 +690,56 @@ message GetExportSinksRequest {
string page_token = 3;
}

message GetExportSinksResponse {
message GetNamespaceExportSinksResponse {
// The list of export sinks retrieved.
repeated temporal.api.cloud.sink.v1.ExportSink sinks = 1;
// The next page token, set if there is another page.
string next_page_token = 2;
}

message UpdateExportSinkRequest {
message UpdateNamespaceExportSinkRequest {
// The namespace to which the sink belongs.
string namespace = 1;
// The name of the sink to update.
string sink_name = 2;
string name = 2;
// The updated export sink specification.
temporal.api.cloud.sink.v1.ExportSinkSpec spec = 3;
// The version of the sink to update. The latest version can be
// retrieved using the GetExportSink call.
// retrieved using the GetNamespaceExportSink call.
string resource_version = 4;
// The ID to use for this async operation - optional.
string async_operation_id = 5;
}

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


message DeleteExportSinkRequest {
message DeleteNamespaceExportSinkRequest {
// The namespace to which the sink belongs.
string namespace = 1;
// The name of the sink to delete.
string sink_name = 2;
string name = 2;
// The version of the sink to delete. The latest version can be
// retrieved using the GetExportSink call.
// retrieved using the GetNamespaceExportSink call.
string resource_version = 3;
// The ID to use for this async operation - optional.
string async_operation_id = 4;
}

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

message ValidateExportSinkRequest {
message ValidateNamespaceExportSinkRequest {
// The namespace to which the sink belongs.
string namespace = 1;
// The export sink specification to validate.
temporal.api.cloud.sink.v1.ExportSinkSpec spec = 2;
}

message ValidateExportSinkResponse {
// The async operation.
temporal.api.cloud.operation.v1.AsyncOperation async_operation = 1;
message ValidateNamespaceExportSinkResponse {
}
18 changes: 9 additions & 9 deletions temporal/api/cloud/cloudservice/v1/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -307,44 +307,44 @@ service CloudService {
}

// Create an export sink
rpc CreateExportSink(CreateExportSinkRequest) returns (CreateExportSinkResponse) {
rpc CreateNamespaceExportSink(CreateNamespaceExportSinkRequest) returns (CreateNamespaceExportSinkResponse) {
option (google.api.http) = {
post: "/cloud/namespaces/{namespace}/sinks",
body: "*"
};
}

// Get an export sink
rpc GetExportSink(GetExportSinkRequest) returns (GetExportSinkResponse) {
rpc GetNamespaceExportSink(GetNamespaceExportSinkRequest) returns (GetNamespaceExportSinkResponse) {
option (google.api.http) = {
get: "/cloud/namespaces/{namespace}/sinks/{sink_name}"
get: "/cloud/namespaces/{namespace}/sinks/{name}"
};
}

// Get export sinks
rpc GetExportSinks(GetExportSinksRequest) returns (GetExportSinksResponse) {
rpc GetNamespaceExportSinks(GetNamespaceExportSinksRequest) returns (GetNamespaceExportSinksResponse) {
option (google.api.http) = {
get: "/cloud/namespaces/{namespace}/sinks"
};
}

// Update an export sink
rpc UpdateExportSink(UpdateExportSinkRequest) returns (UpdateExportSinkResponse) {
rpc UpdateNamespaceExportSink(UpdateNamespaceExportSinkRequest) returns (UpdateNamespaceExportSinkResponse) {
option (google.api.http) = {
post: "/cloud/namespaces/{namespace}/sinks/{sink_name}",
post: "/cloud/namespaces/{namespace}/sinks/{name}",
body: "*"
};
}

// Delete an export sink
rpc DeleteExportSink(DeleteExportSinkRequest) returns (DeleteExportSinkResponse) {
rpc DeleteNamespaceExportSink(DeleteNamespaceExportSinkRequest) returns (DeleteNamespaceExportSinkResponse) {
option (google.api.http) = {
delete: "/cloud/namespaces/{namespace}/sinks/{sink_name}"
delete: "/cloud/namespaces/{namespace}/sinks/{name}"
};
}

// Validate an export sink
rpc ValidateExportSink(ValidateExportSinkRequest) returns (ValidateExportSinkResponse) {
rpc ValidateNamespaceExportSink(ValidateNamespaceExportSinkRequest) returns (ValidateNamespaceExportSinkResponse) {
option (google.api.http) = {
post: "/cloud/namespaces/{namespace}/sinks/validate",
body: "*"
Expand Down
34 changes: 8 additions & 26 deletions temporal/api/cloud/sink/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ syntax = "proto3";
package temporal.api.cloud.sink.v1;

import "google/protobuf/timestamp.proto";
import "temporal/api/cloud/resource/v1/message.proto";


option go_package = "go.temporal.io/api/cloud/sink/v1;sink";
Expand All @@ -13,38 +14,30 @@ option ruby_package = "Temporalio::Api::Cloud::Sink::V1";
option csharp_namespace = "Temporalio.Api.Cloud.Sink.V1";

message ExportSinkSpec {
// The name of the export sink.
// The unique name of the export sink.
string name = 1;

// A flag indicating whether the export sink is enabled or not.
bool enabled = 2;

// The receiving sink type for export.
ExportDestinationType destination_type = 3;

// The S3 configuration details when destination_type is S3.
S3Spec s3_sink = 4;

// The GCS configuration details when destination_type is GCS.
GCSSpec gcs_sink = 5;
S3Spec s3 = 3;

enum ExportDestinationType {
EXPORT_DESTINATION_TYPE_UNSPECIFIED = 0;
EXPORT_DESTINATION_TYPE_S3 = 1;
EXPORT_DESTINATION_TYPE_GCS = 2;
}
// This is a feature under development. We will allow GCS sink support for GCP Namespaces.
// The GCS configuration details when destination_type is GCS.
GCSSpec gcs = 4;
}


message ExportSink {
// The name of the export sink.
// The unique name of the export sink.
string name = 1;

// The version of the export sink resource.
string resource_version = 2;

// The current state of the export sink.
ExportSinkState state = 3;
temporal.api.cloud.resource.v1.ResourceState state = 3;

// The specification details of the export sink.
ExportSinkSpec spec = 4;
Expand All @@ -67,17 +60,6 @@ message ExportSink {
EXPORT_SINK_HEALTH_ERROR_INTERNAL = 2;
EXPORT_SINK_HEALTH_ERROR_USER_CONFIGURATION = 3;
}

enum ExportSinkState {
EXPORT_SINK_STATE_UNSPECIFIED = 0;
EXPORT_SINK_STATE_ACTIVATING = 1;
EXPORT_SINK_STATE_ACTIVE = 2;
EXPORT_SINK_STATE_ACTIVATION_FAILED = 3;
EXPORT_SINK_STATE_DELETING = 4;
EXPORT_SINK_STATE_DELETED = 5;
EXPORT_SINK_STATE_UPDATING = 6;
EXPORT_SINK_STATE_UPDATE_FAILED = 7;
}
}

message S3Spec {
Expand Down

0 comments on commit 9eb1fb3

Please sign in to comment.