Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2484)

Unified Diff: web/inc/logdog-stream/client.ts

Issue 2989313002: [logdog] Stream view explicitly cancels request. (Closed)
Patch Set: Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « web/inc/logdog-stream-view/query.ts ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: web/inc/logdog-stream/client.ts
diff --git a/web/inc/logdog-stream/client.ts b/web/inc/logdog-stream/client.ts
index 3866b3be26d3b85f365dcc88c671fc962b67b0fa..1b20fb7cd45fcdb771d27bb1eda0703797ee0a36 100644
--- a/web/inc/logdog-stream/client.ts
+++ b/web/inc/logdog-stream/client.ts
@@ -6,6 +6,7 @@
///<reference path="logdog.ts" />
///<reference path="../rpc/client.ts" />
+///<reference path="../luci-operation/operation.ts" />
namespace LogDog {
@@ -45,15 +46,16 @@ namespace LogDog {
constructor(private client: luci.Client) {}
/** Get executes a Get RPC. */
- async get(req: GetRequest): Promise<GetResponse> {
+ async get(op: luci.Operation, req: GetRequest): Promise<GetResponse> {
if (this.debug) {
console.log('logdog.Logs.Get:', req);
}
- return this.client.call('logdog.Logs', 'Get', req);
+ return this.client.callOp(op, 'logdog.Logs', 'Get', req);
}
/** Tail executes a Tail RPC. */
- async tail(stream: StreamPath, state: boolean): Promise<GetResponse> {
+ async tail(op: luci.Operation, stream: StreamPath, state: boolean):
+ Promise<GetResponse> {
let request: TailRequest = {
project: stream.project,
path: stream.path,
@@ -63,7 +65,7 @@ namespace LogDog {
if (this.debug) {
console.log('logdog.Logs.Tail:', request);
}
- return this.client.call('logdog.Logs', 'Tail', request);
+ return this.client.callOp(op, 'logdog.Logs', 'Tail', request);
}
/**
@@ -76,8 +78,9 @@ namespace LogDog {
* @return a Promise that resolves to the query results and continuation
* cursor. The cursor may be empty if the query finished.
*/
- async query(params: QueryRequest, cursor = '', limit = 0):
- Promise<[QueryResult[], string]> {
+ async query(
+ op: luci.Operation, params: QueryRequest, cursor = '',
+ limit = 0): Promise<[QueryResult[], string]> {
let project = params.project;
let body: any = {
project: project,
@@ -116,7 +119,7 @@ namespace LogDog {
next: string;
};
let resp: responseType =
- await this.client.call('logdog.Logs', 'Query', body);
+ await this.client.callOp(op, 'logdog.Logs', 'Query', body);
// Package the response in QueryResults.
let results = (resp.streams || []).map(entry => {
« no previous file with comments | « web/inc/logdog-stream-view/query.ts ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698