OLD | NEW |
| (Empty) |
1 // Copyright 2016 The LUCI Authors. All rights reserved. | |
2 // Use of this source code is governed under the Apache License, Version 2.0 | |
3 // that can be found in the LICENSE file. | |
4 | |
5 package logdog | |
6 | |
7 import ( | |
8 miloProto "github.com/luci/luci-go/common/proto/milo" | |
9 ) | |
10 | |
11 // Streams represents a group of LogDog Streams with a single entry point. | |
12 // Generally all of the streams are referenced by the entry point. | |
13 type Streams struct { | |
14 // MainStream is a pointer to the primary stream for this group of strea
ms. | |
15 MainStream *Stream | |
16 // Streams is the full map streamName->stream referenced by MainStream. | |
17 // It includes MainStream. | |
18 Streams map[string]*Stream | |
19 } | |
20 | |
21 // Stream represents a single LogDog style stream, which can contain either | |
22 // annotations (assumed to be MiloProtos) or text. Other types of annotations a
re | |
23 // not supported. | |
24 type Stream struct { | |
25 // Server is the LogDog server this stream originated from. | |
26 Server string | |
27 // Prefix is the LogDog prefix for the Stream. | |
28 Prefix string | |
29 // Path is the final part of the LogDog path of the Stream. | |
30 Path string | |
31 // IsDatagram is true if this is a MiloProto. False implies that this is
a text log. | |
32 IsDatagram bool | |
33 // Data is the miloProto.Step of the Stream, if IsDatagram is true. Oth
erwise | |
34 // this is nil. | |
35 Data *miloProto.Step | |
36 // Text is the text of the Stream, if IsDatagram is false. Otherwise | |
37 // this is an empty string. | |
38 Text string | |
39 | |
40 // Closed specifies whether Text or Data may change in the future. | |
41 // If Closed, they may not. | |
42 Closed bool | |
43 } | |
OLD | NEW |