Skip to content

Commit a4e7c50

Browse files
Google APIscopybara-github
authored andcommitted
chore: update go_package to match open source code
PiperOrigin-RevId: 524048558
1 parent 6124c1d commit a4e7c50

16 files changed

Lines changed: 876 additions & 670 deletions

google/cloud/tasks/v2/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ load(
116116
go_proto_library(
117117
name = "tasks_go_proto",
118118
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
119-
importpath = "cloud.google.com/go/tasks/apiv2/taskspb",
119+
importpath = "cloud.google.com/go/cloudtasks/apiv2/cloudtaskspb",
120120
protos = [":tasks_proto"],
121121
deps = [
122122
"//google/api:annotations_go_proto",
@@ -129,7 +129,7 @@ go_gapic_library(
129129
name = "tasks_go_gapic",
130130
srcs = [":tasks_proto_with_info"],
131131
grpc_service_config = "cloudtasks_grpc_service_config.json",
132-
importpath = "cloud.google.com/go/cloudtasks/apiv2;tasks",
132+
importpath = "cloud.google.com/go/cloudtasks/apiv2;cloudtasks",
133133
release_level = "ga",
134134
rest_numeric_enums = True,
135135
service_yaml = "cloudtasks_v2.yaml",

google/cloud/tasks/v2/cloudtasks.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import "google/iam/v1/policy.proto";
2828
import "google/protobuf/empty.proto";
2929
import "google/protobuf/field_mask.proto";
3030

31-
option go_package = "cloud.google.com/go/tasks/apiv2/taskspb;taskspb";
31+
option go_package = "cloud.google.com/go/cloudtasks/apiv2/cloudtaskspb;cloudtaskspb";
3232
option java_multiple_files = true;
3333
option java_outer_classname = "CloudTasksProto";
3434
option java_package = "com.google.cloud.tasks.v2";

google/cloud/tasks/v2/queue.proto

Lines changed: 57 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import "google/cloud/tasks/v2/target.proto";
2222
import "google/protobuf/duration.proto";
2323
import "google/protobuf/timestamp.proto";
2424

25-
option go_package = "cloud.google.com/go/tasks/apiv2/taskspb;taskspb";
25+
option go_package = "cloud.google.com/go/cloudtasks/apiv2/cloudtaskspb;cloudtaskspb";
2626
option java_multiple_files = true;
2727
option java_outer_classname = "QueueProto";
2828
option java_package = "com.google.cloud.tasks.v2";
@@ -73,8 +73,9 @@ message Queue {
7373
DISABLED = 3;
7474
}
7575

76-
// Caller-specified and required in [CreateQueue][google.cloud.tasks.v2.CloudTasks.CreateQueue],
77-
// after which it becomes output only.
76+
// Caller-specified and required in
77+
// [CreateQueue][google.cloud.tasks.v2.CloudTasks.CreateQueue], after which it
78+
// becomes output only.
7879
//
7980
// The queue name.
8081
//
@@ -95,36 +96,41 @@ message Queue {
9596
string name = 1;
9697

9798
// Overrides for
98-
// [task-level app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing].
99+
// [task-level
100+
// app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing].
99101
// These settings apply only to
100-
// [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in this queue.
101-
// [Http tasks][google.cloud.tasks.v2.HttpRequest] are not affected.
102+
// [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in this
103+
// queue. [Http tasks][google.cloud.tasks.v2.HttpRequest] are not affected.
102104
//
103105
// If set, `app_engine_routing_override` is used for all
104-
// [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in the queue, no matter what the
105-
// setting is for the
106-
// [task-level app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing].
106+
// [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in the
107+
// queue, no matter what the setting is for the [task-level
108+
// app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing].
107109
AppEngineRouting app_engine_routing_override = 2;
108110

109111
// Rate limits for task dispatches.
110112
//
111-
// [rate_limits][google.cloud.tasks.v2.Queue.rate_limits] and [retry_config][google.cloud.tasks.v2.Queue.retry_config] are
112-
// related because they both control task attempts. However they control task
113-
// attempts in different ways:
113+
// [rate_limits][google.cloud.tasks.v2.Queue.rate_limits] and
114+
// [retry_config][google.cloud.tasks.v2.Queue.retry_config] are related
115+
// because they both control task attempts. However they control task attempts
116+
// in different ways:
114117
//
115-
// * [rate_limits][google.cloud.tasks.v2.Queue.rate_limits] controls the total rate of
118+
// * [rate_limits][google.cloud.tasks.v2.Queue.rate_limits] controls the total
119+
// rate of
116120
// dispatches from a queue (i.e. all traffic dispatched from the
117121
// queue, regardless of whether the dispatch is from a first
118122
// attempt or a retry).
119-
// * [retry_config][google.cloud.tasks.v2.Queue.retry_config] controls what happens to
123+
// * [retry_config][google.cloud.tasks.v2.Queue.retry_config] controls what
124+
// happens to
120125
// particular a task after its first attempt fails. That is,
121-
// [retry_config][google.cloud.tasks.v2.Queue.retry_config] controls task retries (the
122-
// second attempt, third attempt, etc).
126+
// [retry_config][google.cloud.tasks.v2.Queue.retry_config] controls task
127+
// retries (the second attempt, third attempt, etc).
123128
//
124129
// The queue's actual dispatch rate is the result of:
125130
//
126131
// * Number of tasks in the queue
127-
// * User-specified throttling: [rate_limits][google.cloud.tasks.v2.Queue.rate_limits],
132+
// * User-specified throttling:
133+
// [rate_limits][google.cloud.tasks.v2.Queue.rate_limits],
128134
// [retry_config][google.cloud.tasks.v2.Queue.retry_config], and the
129135
// [queue's state][google.cloud.tasks.v2.Queue.state].
130136
// * System throttling due to `429` (Too Many Requests) or `503` (Service
@@ -150,16 +156,18 @@ message Queue {
150156
// [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue],
151157
// [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue], or uploading
152158
// [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
153-
// [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue] cannot be used to change `state`.
159+
// [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue] cannot be used
160+
// to change `state`.
154161
State state = 5;
155162

156163
// Output only. The last time this queue was purged.
157164
//
158-
// All tasks that were [created][google.cloud.tasks.v2.Task.create_time] before this time
159-
// were purged.
165+
// All tasks that were [created][google.cloud.tasks.v2.Task.create_time]
166+
// before this time were purged.
160167
//
161-
// A queue can be purged using [PurgeQueue][google.cloud.tasks.v2.CloudTasks.PurgeQueue], the
162-
// [App Engine Task Queue SDK, or the Cloud
168+
// A queue can be purged using
169+
// [PurgeQueue][google.cloud.tasks.v2.CloudTasks.PurgeQueue], the [App Engine
170+
// Task Queue SDK, or the Cloud
163171
// Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
164172
//
165173
// Purge time will be truncated to the nearest microsecond. Purge
@@ -177,8 +185,9 @@ message Queue {
177185
// This message determines the maximum rate that tasks can be dispatched by a
178186
// queue, regardless of whether the dispatch is a first task attempt or a retry.
179187
//
180-
// Note: The debugging command, [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask], will run a task
181-
// even if the queue has reached its [RateLimits][google.cloud.tasks.v2.RateLimits].
188+
// Note: The debugging command,
189+
// [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask], will run a task even if
190+
// the queue has reached its [RateLimits][google.cloud.tasks.v2.RateLimits].
182191
message RateLimits {
183192
// The maximum rate at which tasks are dispatched from this queue.
184193
//
@@ -218,9 +227,9 @@ message RateLimits {
218227
// `queue.yaml/xml`, `max_burst_size` is equal to
219228
// [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
220229
// Since `max_burst_size` is output only, if
221-
// [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue] is called on a queue
222-
// created by `queue.yaml/xml`, `max_burst_size` will be reset based
223-
// on the value of
230+
// [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue] is called on a
231+
// queue created by `queue.yaml/xml`, `max_burst_size` will be reset based on
232+
// the value of
224233
// [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second],
225234
// regardless of whether
226235
// [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second]
@@ -269,9 +278,9 @@ message RetryConfig {
269278
// If positive, `max_retry_duration` specifies the time limit for
270279
// retrying a failed task, measured from when the task was first
271280
// attempted. Once `max_retry_duration` time has passed *and* the
272-
// task has been attempted [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts]
273-
// times, no further attempts will be made and the task will be
274-
// deleted.
281+
// task has been attempted
282+
// [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times, no
283+
// further attempts will be made and the task will be deleted.
275284
//
276285
// If zero, then the task age is unlimited.
277286
//
@@ -286,11 +295,12 @@ message RetryConfig {
286295
// queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
287296
google.protobuf.Duration max_retry_duration = 2;
288297

289-
// A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for retry between
290-
// [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] and
291-
// [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration after it fails,
292-
// if the queue's [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task should be
293-
// retried.
298+
// A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for
299+
// retry between [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff]
300+
// and [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration
301+
// after it fails, if the queue's
302+
// [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task
303+
// should be retried.
294304
//
295305
// If unspecified when the queue is created, Cloud Tasks will pick the
296306
// default.
@@ -303,11 +313,12 @@ message RetryConfig {
303313
// queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
304314
google.protobuf.Duration min_backoff = 3;
305315

306-
// A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for retry between
307-
// [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] and
308-
// [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration after it fails,
309-
// if the queue's [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task should be
310-
// retried.
316+
// A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for
317+
// retry between [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff]
318+
// and [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration
319+
// after it fails, if the queue's
320+
// [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task
321+
// should be retried.
311322
//
312323
// If unspecified when the queue is created, Cloud Tasks will pick the
313324
// default.
@@ -329,15 +340,16 @@ message RetryConfig {
329340
// [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] up to
330341
// [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times.
331342
//
332-
// For example, if [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] is 10s,
343+
// For example, if
344+
// [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] is 10s,
333345
// [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] is 300s, and
334346
// `max_doublings` is 3, then the a task will first be retried in
335347
// 10s. The retry interval will double three times, and then
336348
// increase linearly by 2^3 * 10s. Finally, the task will retry at
337-
// intervals of [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] until the
338-
// task has been attempted [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts]
339-
// times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
340-
// 240s, 300s, 300s, ....
349+
// intervals of [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff]
350+
// until the task has been attempted
351+
// [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times. Thus,
352+
// the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, ....
341353
//
342354
// If unspecified when the queue is created, Cloud Tasks will pick the
343355
// default.

0 commit comments

Comments
 (0)