Skip to content

Commit

Permalink
feat: Add current state of export subscriptions to API
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 488739443
  • Loading branch information
Google APIs authored and Copybara-Service committed Nov 15, 2022
1 parent 43bf96f commit f7375bc
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 12 deletions.
2 changes: 1 addition & 1 deletion google/cloud/pubsublite/v1/admin.proto
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
24 changes: 20 additions & 4 deletions google/cloud/pubsublite/v1/common.proto
Expand Up @@ -236,7 +236,7 @@ message Subscription {
// Configuration for a Pub/Sub Lite subscription that writes messages to a
// destination. User subscriber clients must not connect to this subscription.
message ExportConfig {
// An export state.
// The desired export state.
enum State {
// Default value. This value is unused.
STATE_UNSPECIFIED = 0;
Expand All @@ -246,6 +246,12 @@ message ExportConfig {

// Exporting messages is suspended.
PAUSED = 2;

// Messages cannot be exported due to permission denied errors. Output only.
PERMISSION_DENIED = 3;

// Messages cannot be exported due to missing resources. Output only.
NOT_FOUND = 4;
}

// The export status of a partition.
Expand All @@ -272,11 +278,21 @@ message ExportConfig {
string topic = 1;
}

// The desired state of this export.
// The desired state of this export. Setting this to values other than
// `ACTIVE` and `PAUSED` will result in an error.
State desired_state = 1;

// Output only. The export statuses of each partition. This field is output only.
repeated PartitionStatus statuses = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The current state of the export, which may be different to the desired
// state due to errors.
State current_state = 6 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Deprecated: replaced by `current_state`.
//
// The export statuses of each partition.
repeated PartitionStatus statuses = 4 [
deprecated = true,
(google.api.field_behavior) = OUTPUT_ONLY
];

// Optional. The name of an optional Pub/Sub Lite topic to publish messages that can not
// be exported to the destination. For example, the message can not be
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/pubsublite/v1/cursor.proto
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
5 changes: 3 additions & 2 deletions google/cloud/pubsublite/v1/publisher.proto
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -16,8 +16,9 @@ syntax = "proto3";

package google.cloud.pubsublite.v1;

import "google/cloud/pubsublite/v1/common.proto";
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/cloud/pubsublite/v1/common.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Cloud.PubSubLite.V1";
Expand Down
5 changes: 3 additions & 2 deletions google/cloud/pubsublite/v1/subscriber.proto
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -16,9 +16,10 @@ syntax = "proto3";

package google.cloud.pubsublite.v1;

import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/cloud/pubsublite/v1/common.proto";
import "google/api/client.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Cloud.PubSubLite.V1";
Expand Down
4 changes: 2 additions & 2 deletions google/cloud/pubsublite/v1/topic_stats.proto
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -17,11 +17,11 @@ syntax = "proto3";
package google.cloud.pubsublite.v1;

import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/pubsublite/v1/common.proto";
import "google/protobuf/timestamp.proto";
import "google/api/client.proto";

option csharp_namespace = "Google.Cloud.PubSubLite.V1";
option go_package = "google.golang.org/genproto/googleapis/cloud/pubsublite/v1;pubsublite";
Expand Down

0 comments on commit f7375bc

Please sign in to comment.