Index: common/api/logdog_coordinator/registration/v1/service.proto |
diff --git a/common/api/logdog_coordinator/registration/v1/service.proto b/common/api/logdog_coordinator/registration/v1/service.proto |
new file mode 100644 |
index 0000000000000000000000000000000000000000..88faaa197fad13eea99e5dac3e567994f0bd1328 |
--- /dev/null |
+++ b/common/api/logdog_coordinator/registration/v1/service.proto |
@@ -0,0 +1,62 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+syntax = "proto3"; |
+ |
+package logdog; |
+ |
+import "google/protobuf/duration.proto"; |
+ |
+// RegisterPrefixRequest registers a new Prefix with the Coordinator. |
+message RegisterPrefixRequest { |
+ // The log stream's project. |
+ string project = 1; |
+ // Optional information about the registering agent. |
+ repeated string source_info = 2; |
+ |
+ // The protobuf version string for this stream. |
+ string proto_version = 3; |
+ // The serialized LogStreamDescriptor protobuf for this stream. The stream's |
+ // path is extracted from this field. |
+ bytes desc = 4; |
+ |
+ // The prefix expiration time. If <= 0, the project's default prefix |
+ // expiration period will be applied. |
+ // |
+ // The prefix will be closed by the Coordinator after its expiration period. |
+ // Once closed, new stream registration requests will no longer be accepted. |
+ // |
+ // If supplied, this value should exceed the timeout of the local task, else |
+ // some of the task's streams may be dropped due to failing registration. |
+ google.protobuf.Duration expiration = 5; |
+} |
+ |
+// The response message for the RegisterPrefix RPC. |
+message RegisterPrefixResponse { |
+ // Secret is the prefix's secret. This must be included verbatim in Butler |
+ // bundles to assert ownership of this prefix. |
+ bytes secret = 1; |
+ |
+ // The name of the Pub/Sub topic to publish butlerproto-formatted Butler log |
+ // bundles to. |
+ string log_bundle_topic = 2; |
+} |
+ |
+// Registration service is a LogDog Coordinator endpoint that interfaces with |
+// LogDog Butler instances and enables stream prefix registration and Butler |
+// streaming initialization. |
+service Registration { |
+ // RegisterStream allows a Butler instance to register a log stream with the |
+ // Coordinator. Upon success, the Coordinator will return registration |
+ // information and streaming parameters to the Butler. |
+ // |
+ // This should be called by a Butler instance to gain the ability to publish |
+ // to a prefix space. The caller must have WRITE access to its project's |
+ // stream space. If WRITE access is not present, this will fail with the |
+ // "PermissionDenied" gRPC code. |
+ // |
+ // A stream prefix may be registered at most once. Additional registration |
+ // requests will fail with the "AlreadyExists" gRPC code. |
+ rpc RegisterPrefix(RegisterPrefixRequest) returns (RegisterPrefixResponse); |
+} |