Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The LUCI Authors. All rights reserved. | 1 // Copyright 2016 The LUCI Authors. All rights reserved. |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 | 2 // Use of this source code is governed under the Apache License, Version 2.0 |
| 3 // that can be found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
| 4 | 4 |
| 5 syntax = "proto3"; | 5 syntax = "proto3"; |
| 6 | 6 |
| 7 package logdog; | 7 package logdog; |
| 8 | 8 |
| 9 import "github.com/luci/luci-go/logdog/api/endpoints/coordinator/logs/v1/state.p roto"; | 9 import "github.com/luci/luci-go/logdog/api/endpoints/coordinator/logs/v1/state.p roto"; |
| 10 import "github.com/luci/luci-go/logdog/api/logpb/log.proto"; | 10 import "github.com/luci/luci-go/logdog/api/logpb/log.proto"; |
| 11 import "google/protobuf/timestamp.proto"; | 11 import "google/protobuf/timestamp.proto"; |
| 12 import "google/protobuf/duration.proto"; | |
| 12 | 13 |
| 13 // GetRequest is the request structure for the user Get endpoint. | 14 // GetRequest is the request structure for the user Get endpoint. |
| 14 // | 15 // |
| 15 // If the requested log stream exists, a valid GetRequest will succeed | 16 // If the requested log stream exists, a valid GetRequest will succeed |
| 16 // regardless of whether the requested log range was available. | 17 // regardless of whether the requested log range was available. |
| 17 // | 18 // |
| 18 // Note that this endpoint may return fewer logs than requested due to either | 19 // Note that this endpoint may return fewer logs than requested due to either |
| 19 // availability or internal constraints. | 20 // availability or internal constraints. |
| 20 message GetRequest { | 21 message GetRequest { |
| 21 // The request project to request. | 22 // The request project to request. |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 57 // Index and stop if either the end of stream is encountered or there is a | 58 // Index and stop if either the end of stream is encountered or there is a |
| 58 // missing stream index. A NonContiguous request will remove the latter | 59 // missing stream index. A NonContiguous request will remove the latter |
| 59 // condition. | 60 // condition. |
| 60 // | 61 // |
| 61 // For example, say the log stream consists of: | 62 // For example, say the log stream consists of: |
| 62 // [3, 4, 6, 7] | 63 // [3, 4, 6, 7] |
| 63 // | 64 // |
| 64 // A contiguous request with Index 3 will return: [3, 4], stopping because | 65 // A contiguous request with Index 3 will return: [3, 4], stopping because |
| 65 // 5 is missing. A non-contiguous request will return [3, 4, 6, 7]. | 66 // 5 is missing. A non-contiguous request will return [3, 4, 6, 7]. |
| 66 bool non_contiguous = 7; | 67 bool non_contiguous = 7; |
| 68 | |
| 69 // If supplied, the response will contain a SignedUrls message with the | |
| 70 // requested signed URLs. If signed URLs are not supported by the log's | |
| 71 // current storage system, the response message will be empty. | |
| 72 message SignURLRequest { | |
| 73 // The lifetime that the signed URL will be bound to.. The | |
| 74 google.protobuf.Duration lifetime = 1; | |
| 75 | |
| 76 // Return a signed URL for the log's RecordIO protobuf data. | |
| 77 bool stream = 2; | |
| 78 // Return a signed URL for the log's LogIndex protobuf. | |
| 79 bool index = 3; | |
| 80 } | |
| 81 SignURLRequest get_signed_urls = 8; | |
| 67 } | 82 } |
| 68 | 83 |
| 69 // TailRequest is the request structure for the user Tail endpoint. It returns | 84 // TailRequest is the request structure for the user Tail endpoint. It returns |
| 70 // the last log in a given log stream at the time of the request. | 85 // the last log in a given log stream at the time of the request. |
| 71 message TailRequest { | 86 message TailRequest { |
| 72 // The request project to request. | 87 // The request project to request. |
| 73 string project = 1; | 88 string project = 1; |
| 74 // The path of the log stream to get. | 89 // The path of the log stream to get. |
| 75 // | 90 // |
| 76 // This can either be a LogDog stream path or the SHA256 hash of a LogDog | 91 // This can either be a LogDog stream path or the SHA256 hash of a LogDog |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 99 // The expanded LogStreamDescriptor protobuf. It is intended for JSON | 114 // The expanded LogStreamDescriptor protobuf. It is intended for JSON |
| 100 // consumption. | 115 // consumption. |
| 101 // | 116 // |
| 102 // If the GetRequest's Proto field is false, this will be populated; | 117 // If the GetRequest's Proto field is false, this will be populated; |
| 103 // otherwise, the serialized protobuf will be written to the DescriptorProto | 118 // otherwise, the serialized protobuf will be written to the DescriptorProto |
| 104 // field. | 119 // field. |
| 105 logpb.LogStreamDescriptor desc = 3; | 120 logpb.LogStreamDescriptor desc = 3; |
| 106 | 121 |
| 107 // Log represents the set of retrieved log records. | 122 // Log represents the set of retrieved log records. |
| 108 repeated logpb.LogEntry logs = 4; | 123 repeated logpb.LogEntry logs = 4; |
| 124 | |
| 125 // Holds information about the log stream's signed entry URL. | |
| 126 message SignedUrls { | |
| 127 // The time when this signed URL will expire. | |
| 128 google.protobuf.Timestamp expiration = 1; | |
| 129 | |
| 130 // The signed log stream URL, if requested. | |
| 131 string stream = 2; | |
| 132 // The signed log index URL, if requested. | |
| 133 string index = 3; | |
| 134 } | |
| 135 // An optional signed log entry RecordIO protobuf URL, if requested via | |
| 136 // "sign_entry_url_lifetime". | |
|
Vadim Sh.
2016/12/01 19:32:13
"sign_entry_url_lifetime" is no longer defined
| |
| 137 SignedUrls signed_urls = 5; | |
| 109 } | 138 } |
| 110 | 139 |
| 111 // QueryRequest is the request structure for the user Query endpoint. | 140 // QueryRequest is the request structure for the user Query endpoint. |
| 112 message QueryRequest { | 141 message QueryRequest { |
| 113 // Trinary represents a trinary value. | 142 // Trinary represents a trinary value. |
| 114 enum Trinary { | 143 enum Trinary { |
| 115 // Both positive and negative results will be returned. | 144 // Both positive and negative results will be returned. |
| 116 BOTH = 0; | 145 BOTH = 0; |
| 117 // Only positive results will be returned. | 146 // Only positive results will be returned. |
| 118 YES = 1; | 147 YES = 1; |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 346 | 375 |
| 347 // Tail returns the last log in the log stream at the time of the request. | 376 // Tail returns the last log in the log stream at the time of the request. |
| 348 rpc Tail(TailRequest) returns (GetResponse); | 377 rpc Tail(TailRequest) returns (GetResponse); |
| 349 | 378 |
| 350 // Query returns log stream paths that match the requested query. | 379 // Query returns log stream paths that match the requested query. |
| 351 rpc Query(QueryRequest) returns (QueryResponse); | 380 rpc Query(QueryRequest) returns (QueryResponse); |
| 352 | 381 |
| 353 // List returns log stream paths rooted under the path hierarchy. | 382 // List returns log stream paths rooted under the path hierarchy. |
| 354 rpc List(ListRequest) returns (ListResponse); | 383 rpc List(ListRequest) returns (ListResponse); |
| 355 } | 384 } |
| OLD | NEW |