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

Side by Side Diff: common/api/logdog_coordinator/services/v1/util.go

Issue 1910923002: LogDog: Add project namespace to service endpoint. (Closed) Base URL: https://github.com/luci/luci-go@logdog-project-coordinator-backend
Patch Set: Comments. Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package logdog 5 package logdog
6 6
7 // GetMessageProject implements ProjectBoundMessage.
8 func (ar *RegisterStreamRequest) GetMessageProject() string { return ar.Project }
9
10 // GetMessageProject implements ProjectBoundMessage.
11 func (ar *LoadStreamRequest) GetMessageProject() string { return ar.Project }
12
13 // GetMessageProject implements ProjectBoundMessage.
14 func (ar *TerminateStreamRequest) GetMessageProject() string { return ar.Project }
15
16 // GetMessageProject implements ProjectBoundMessage.
17 func (ar *ArchiveStreamRequest) GetMessageProject() string { return ar.Project }
18
7 // Complete returns true if the archive request expresses that the archived 19 // Complete returns true if the archive request expresses that the archived
8 // log stream was complete. 20 // log stream was complete.
9 // 21 //
10 // A log stream is complete if every entry between zero and its terminal index 22 // A log stream is complete if every entry between zero and its terminal index
11 // is included. 23 // is included.
12 func (ar *ArchiveStreamRequest) Complete() bool { 24 func (ar *ArchiveStreamRequest) Complete() bool {
13 tidx := ar.TerminalIndex 25 tidx := ar.TerminalIndex
14 if tidx < 0 { 26 if tidx < 0 {
15 tidx = -1 27 tidx = -1
16 } 28 }
17 return (ar.LogEntryCount == (tidx + 1)) 29 return (ar.LogEntryCount == (tidx + 1))
18 } 30 }
OLDNEW
« no previous file with comments | « common/api/logdog_coordinator/services/v1/state.pb.go ('k') | common/logdog/types/streamsecret.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698