| // Copyright 2020 The LUCI Authors. |
| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); |
| // you may not use this file except in compliance with the License. |
| // You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| |
| syntax = "proto3"; |
| |
| package cv.prjmanager.prjpb; |
| |
| option go_package = "go.chromium.org/luci/cv/internal/prjmanager/prjpb;prjpb"; |
| |
| |
| // Event is a container for all kinds of events a project manager can receive. |
| message Event { |
| oneof event { |
| NewConfig new_config = 1; |
| |
| Poke poke = 2; |
| |
| CLUpdated cl_updated = 3; |
| CLsUpdated cls_updated = 7; |
| |
| RunCreated run_created = 4; |
| RunFinished run_finished = 5; |
| |
| PurgeCompleted purge_completed = 6; |
| } |
| } |
| |
| // NewConfig is sent to PM by Project Config updater upon saving newest config |
| // in datastore. |
| message NewConfig {} |
| |
| // Poke is sent to PM by Project Config updater. |
| message Poke {} |
| |
| // CLUpdated is sent to PM when a CL entity attributes relevant to PM were |
| // updated, e.g. Snapshot. |
| message CLUpdated { |
| // Internal ID of a CL that was updated. |
| int64 clid = 1; |
| // EVersion of the updated CL entity. |
| int64 eversion = 2; |
| } |
| |
| // CLsUpdated are multiple CLUpdated events. |
| message CLsUpdated { |
| repeated CLUpdated cls = 1; |
| } |
| |
| // RunCreated is sent to PM by either itself or API-based Run creation. |
| message RunCreated { |
| string run_id = 1; |
| } |
| |
| // RunFinished is sent to PM by Run Manager after or atomically with changing Run's |
| // status to a final status. |
| message RunFinished { |
| string run_id = 1; |
| } |
| |
| // PurgingCompleted is sent to PM by TQ task purging a CL. |
| // |
| // See storage.proto:PurgingCL doc. |
| // |
| // There is no status of the purge because it's the CL state that matters, |
| // hence success or failure will reach PM via CLUpdated event. |
| message PurgeCompleted { |
| // Operation ID suffices to identify a purge. |
| string operation_id = 1; |
| } |