go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/server/tq/internal/tqpb/payload.proto (about)

     1  // Copyright 2020 The LUCI Authors.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //      http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  syntax = "proto3";
    16  
    17  package luci.server.tq.internal;
    18  
    19  option go_package = "go.chromium.org/luci/server/tq/internal/tqpb";
    20  
    21  import "google/protobuf/timestamp.proto";
    22  
    23  // Payload is stored inside reminder records.
    24  //
    25  // It is prepared by the dispatcher and consumed by the sweeper and submitters.
    26  message Payload {
    27    // Fields used for monitoring and logging only.
    28    string task_class = 1;                 // corresponding TaskClass.ID
    29    google.protobuf.Timestamp created = 2; // when AddTask was called
    30  
    31    // Actual payload. We store them as blobs to avoid depending on Google Cloud
    32    // raw *.proto files which are not quite trivial to link to without Bazel.
    33    oneof payload {
    34      bytes create_task_request = 20; // serialized cloud.tasks.v2.CreateTaskRequest
    35      bytes publish_request = 21;     // serialized pubsub.v1.PublishRequest
    36    }
    37  }