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

Unified Diff: common/logdog/protocol/butler.pb.go

Issue 1272893004: LogDog: Update protobufs, add support library. (Closed) Base URL: https://github.com/luci/luci-go@master
Patch Set: Created 5 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
Index: common/logdog/protocol/butler.pb.go
diff --git a/common/logdog/protocol/butler.pb.go b/common/logdog/protocol/butler.pb.go
index 5194d6490f382b2a6001c4084da0dc33aa09f895..455128d7c7da6a82f0dda39ca83aea83c7148817 100644
--- a/common/logdog/protocol/butler.pb.go
+++ b/common/logdog/protocol/butler.pb.go
@@ -12,6 +12,68 @@ var _ = proto.Marshal
var _ = math.Inf
//
+// This enumerates the possible contents of published Butler data.
+type ButlerMetadata_ContentType int32
+
+const (
+ // The published data is a ButlerLogBundle protobuf message.
+ ButlerMetadata_ButlerLogBundle ButlerMetadata_ContentType = 1
+)
+
+var ButlerMetadata_ContentType_name = map[int32]string{
+ 1: "ButlerLogBundle",
+}
+var ButlerMetadata_ContentType_value = map[string]int32{
+ "ButlerLogBundle": 1,
+}
+
+func (x ButlerMetadata_ContentType) Enum() *ButlerMetadata_ContentType {
+ p := new(ButlerMetadata_ContentType)
+ *p = x
+ return p
+}
+func (x ButlerMetadata_ContentType) String() string {
+ return proto.EnumName(ButlerMetadata_ContentType_name, int32(x))
+}
+func (x *ButlerMetadata_ContentType) UnmarshalJSON(data []byte) error {
+ value, err := proto.UnmarshalJSONEnum(ButlerMetadata_ContentType_value, data, "ButlerMetadata_ContentType")
+ if err != nil {
+ return err
+ }
+ *x = ButlerMetadata_ContentType(value)
+ return nil
+}
+
+//
+// ButlerMetadata appears as a frame at the beginning of Butler published data
+// to describe the remainder of the contents.
+type ButlerMetadata struct {
+ // This is the type of data in the subsequent frame.
+ Type *ButlerMetadata_ContentType `protobuf:"varint,1,opt,name=type,enum=protocol.ButlerMetadata_ContentType" json:"type,omitempty"`
+ // If true, the content data is compressed.
+ Compressed *bool `protobuf:"varint,2,opt,name=compressed" json:"compressed,omitempty"`
+ XXX_unrecognized []byte `json:"-"`
+}
+
+func (m *ButlerMetadata) Reset() { *m = ButlerMetadata{} }
+func (m *ButlerMetadata) String() string { return proto.CompactTextString(m) }
+func (*ButlerMetadata) ProtoMessage() {}
+
+func (m *ButlerMetadata) GetType() ButlerMetadata_ContentType {
+ if m != nil && m.Type != nil {
+ return *m.Type
+ }
+ return ButlerMetadata_ButlerLogBundle
+}
+
+func (m *ButlerMetadata) GetCompressed() bool {
+ if m != nil && m.Compressed != nil {
+ return *m.Compressed
+ }
+ return false
+}
+
+//
// A message containing log data in transit from the Butler.
//
// The Butler is capable of conserving bandwidth by bundling collected log
@@ -101,11 +163,15 @@ type ButlerLogBundle_Entry struct {
// exceeding the terminal log's index will be discarded.
Terminal *bool `protobuf:"varint,3,opt,name=terminal" json:"terminal,omitempty"`
//
+ // If terminal is true, this is the terminal stream index; that is, the last
+ // message index in the stream.
+ TerminalIndex *uint64 `protobuf:"varint,4,opt,name=terminal_index" json:"terminal_index,omitempty"`
+ //
// Log entries attached to this record. These must be sequential and in
// order.
//
// This is the main log entry content.
- Logs []*LogEntry `protobuf:"bytes,4,rep,name=logs" json:"logs,omitempty"`
+ Logs []*LogEntry `protobuf:"bytes,5,rep,name=logs" json:"logs,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
@@ -134,6 +200,13 @@ func (m *ButlerLogBundle_Entry) GetTerminal() bool {
return false
}
+func (m *ButlerLogBundle_Entry) GetTerminalIndex() uint64 {
+ if m != nil && m.TerminalIndex != nil {
+ return *m.TerminalIndex
+ }
+ return 0
+}
+
func (m *ButlerLogBundle_Entry) GetLogs() []*LogEntry {
if m != nil {
return m.Logs
@@ -142,4 +215,5 @@ func (m *ButlerLogBundle_Entry) GetLogs() []*LogEntry {
}
func init() {
+ proto.RegisterEnum("protocol.ButlerMetadata_ContentType", ButlerMetadata_ContentType_name, ButlerMetadata_ContentType_value)
}

Powered by Google App Engine
This is Rietveld 408576698