| OLD | NEW |
| 1 // Code generated by protoc-gen-go. | 1 // Code generated by protoc-gen-go. |
| 2 // source: butler.proto | 2 // source: butler.proto |
| 3 // DO NOT EDIT! | 3 // DO NOT EDIT! |
| 4 | 4 |
| 5 package protocol | 5 package protocol |
| 6 | 6 |
| 7 import proto "github.com/golang/protobuf/proto" | 7 import proto "github.com/golang/protobuf/proto" |
| 8 import math "math" | 8 import math "math" |
| 9 | 9 |
| 10 // Reference imports to suppress errors if they are not otherwise used. | 10 // Reference imports to suppress errors if they are not otherwise used. |
| 11 var _ = proto.Marshal | 11 var _ = proto.Marshal |
| 12 var _ = math.Inf | 12 var _ = math.Inf |
| 13 | 13 |
| 14 // | 14 // |
| 15 // This enumerates the possible contents of published Butler data. |
| 16 type ButlerMetadata_ContentType int32 |
| 17 |
| 18 const ( |
| 19 // The published data is a ButlerLogBundle protobuf message. |
| 20 ButlerMetadata_ButlerLogBundle ButlerMetadata_ContentType = 1 |
| 21 ) |
| 22 |
| 23 var ButlerMetadata_ContentType_name = map[int32]string{ |
| 24 1: "ButlerLogBundle", |
| 25 } |
| 26 var ButlerMetadata_ContentType_value = map[string]int32{ |
| 27 "ButlerLogBundle": 1, |
| 28 } |
| 29 |
| 30 func (x ButlerMetadata_ContentType) Enum() *ButlerMetadata_ContentType { |
| 31 p := new(ButlerMetadata_ContentType) |
| 32 *p = x |
| 33 return p |
| 34 } |
| 35 func (x ButlerMetadata_ContentType) String() string { |
| 36 return proto.EnumName(ButlerMetadata_ContentType_name, int32(x)) |
| 37 } |
| 38 func (x *ButlerMetadata_ContentType) UnmarshalJSON(data []byte) error { |
| 39 value, err := proto.UnmarshalJSONEnum(ButlerMetadata_ContentType_value,
data, "ButlerMetadata_ContentType") |
| 40 if err != nil { |
| 41 return err |
| 42 } |
| 43 *x = ButlerMetadata_ContentType(value) |
| 44 return nil |
| 45 } |
| 46 |
| 47 // |
| 48 // ButlerMetadata appears as a frame at the beginning of Butler published data |
| 49 // to describe the remainder of the contents. |
| 50 type ButlerMetadata struct { |
| 51 // This is the type of data in the subsequent frame. |
| 52 Type *ButlerMetadata_ContentType `protobuf:"varint,1,opt,name=type,enum=
protocol.ButlerMetadata_ContentType" json:"type,omitempty"` |
| 53 // If true, the content data is compressed. |
| 54 Compressed *bool `protobuf:"varint,2,opt,name=compressed" json:"c
ompressed,omitempty"` |
| 55 XXX_unrecognized []byte `json:"-"` |
| 56 } |
| 57 |
| 58 func (m *ButlerMetadata) Reset() { *m = ButlerMetadata{} } |
| 59 func (m *ButlerMetadata) String() string { return proto.CompactTextString(m) } |
| 60 func (*ButlerMetadata) ProtoMessage() {} |
| 61 |
| 62 func (m *ButlerMetadata) GetType() ButlerMetadata_ContentType { |
| 63 if m != nil && m.Type != nil { |
| 64 return *m.Type |
| 65 } |
| 66 return ButlerMetadata_ButlerLogBundle |
| 67 } |
| 68 |
| 69 func (m *ButlerMetadata) GetCompressed() bool { |
| 70 if m != nil && m.Compressed != nil { |
| 71 return *m.Compressed |
| 72 } |
| 73 return false |
| 74 } |
| 75 |
| 76 // |
| 15 // A message containing log data in transit from the Butler. | 77 // A message containing log data in transit from the Butler. |
| 16 // | 78 // |
| 17 // The Butler is capable of conserving bandwidth by bundling collected log | 79 // The Butler is capable of conserving bandwidth by bundling collected log |
| 18 // messages together into this protocol buffer. Based on Butler bundling | 80 // messages together into this protocol buffer. Based on Butler bundling |
| 19 // settings, this message can represent anything from a single LogRecord to | 81 // settings, this message can represent anything from a single LogRecord to |
| 20 // multiple LogRecords belonging to several different streams. | 82 // multiple LogRecords belonging to several different streams. |
| 21 // | 83 // |
| 22 // Entries in a Log Bundle are fully self-descriptive: no additional information | 84 // Entries in a Log Bundle are fully self-descriptive: no additional information |
| 23 // is needed to fully associate the contained data with its proper place in | 85 // is needed to fully associate the contained data with its proper place in |
| 24 // the source log stream. | 86 // the source log stream. |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // If present and "true", this field declares that this Entry is the las
t | 156 // If present and "true", this field declares that this Entry is the las
t |
| 95 // such entry in the stream. This fact is recorded by the Collector and | 157 // such entry in the stream. This fact is recorded by the Collector and |
| 96 // registered with the Coordinator. The largest stream prefix in this En
try | 158 // registered with the Coordinator. The largest stream prefix in this En
try |
| 97 // will be bound the stream's LogEntry records to [0:largest_prefix]. On
ce | 159 // will be bound the stream's LogEntry records to [0:largest_prefix]. On
ce |
| 98 // all messages in that range have been received, the log may be archive
d. | 160 // all messages in that range have been received, the log may be archive
d. |
| 99 // | 161 // |
| 100 // Further log entries belonging to this stream with stream indices | 162 // Further log entries belonging to this stream with stream indices |
| 101 // exceeding the terminal log's index will be discarded. | 163 // exceeding the terminal log's index will be discarded. |
| 102 Terminal *bool `protobuf:"varint,3,opt,name=terminal" json:"terminal,omi
tempty"` | 164 Terminal *bool `protobuf:"varint,3,opt,name=terminal" json:"terminal,omi
tempty"` |
| 103 // | 165 // |
| 166 // If terminal is true, this is the terminal stream index; that is, the
last |
| 167 // message index in the stream. |
| 168 TerminalIndex *uint64 `protobuf:"varint,4,opt,name=terminal_index" json:
"terminal_index,omitempty"` |
| 169 // |
| 104 // Log entries attached to this record. These must be sequential and in | 170 // Log entries attached to this record. These must be sequential and in |
| 105 // order. | 171 // order. |
| 106 // | 172 // |
| 107 // This is the main log entry content. | 173 // This is the main log entry content. |
| 108 » Logs []*LogEntry `protobuf:"bytes,4,rep,name=logs" json:"log
s,omitempty"` | 174 » Logs []*LogEntry `protobuf:"bytes,5,rep,name=logs" json:"log
s,omitempty"` |
| 109 XXX_unrecognized []byte `json:"-"` | 175 XXX_unrecognized []byte `json:"-"` |
| 110 } | 176 } |
| 111 | 177 |
| 112 func (m *ButlerLogBundle_Entry) Reset() { *m = ButlerLogBundle_Entry{} } | 178 func (m *ButlerLogBundle_Entry) Reset() { *m = ButlerLogBundle_Entry{} } |
| 113 func (m *ButlerLogBundle_Entry) String() string { return proto.CompactTextString
(m) } | 179 func (m *ButlerLogBundle_Entry) String() string { return proto.CompactTextString
(m) } |
| 114 func (*ButlerLogBundle_Entry) ProtoMessage() {} | 180 func (*ButlerLogBundle_Entry) ProtoMessage() {} |
| 115 | 181 |
| 116 func (m *ButlerLogBundle_Entry) GetDesc() *LogStreamDescriptor { | 182 func (m *ButlerLogBundle_Entry) GetDesc() *LogStreamDescriptor { |
| 117 if m != nil { | 183 if m != nil { |
| 118 return m.Desc | 184 return m.Desc |
| 119 } | 185 } |
| 120 return nil | 186 return nil |
| 121 } | 187 } |
| 122 | 188 |
| 123 func (m *ButlerLogBundle_Entry) GetSecret() []byte { | 189 func (m *ButlerLogBundle_Entry) GetSecret() []byte { |
| 124 if m != nil { | 190 if m != nil { |
| 125 return m.Secret | 191 return m.Secret |
| 126 } | 192 } |
| 127 return nil | 193 return nil |
| 128 } | 194 } |
| 129 | 195 |
| 130 func (m *ButlerLogBundle_Entry) GetTerminal() bool { | 196 func (m *ButlerLogBundle_Entry) GetTerminal() bool { |
| 131 if m != nil && m.Terminal != nil { | 197 if m != nil && m.Terminal != nil { |
| 132 return *m.Terminal | 198 return *m.Terminal |
| 133 } | 199 } |
| 134 return false | 200 return false |
| 135 } | 201 } |
| 136 | 202 |
| 203 func (m *ButlerLogBundle_Entry) GetTerminalIndex() uint64 { |
| 204 if m != nil && m.TerminalIndex != nil { |
| 205 return *m.TerminalIndex |
| 206 } |
| 207 return 0 |
| 208 } |
| 209 |
| 137 func (m *ButlerLogBundle_Entry) GetLogs() []*LogEntry { | 210 func (m *ButlerLogBundle_Entry) GetLogs() []*LogEntry { |
| 138 if m != nil { | 211 if m != nil { |
| 139 return m.Logs | 212 return m.Logs |
| 140 } | 213 } |
| 141 return nil | 214 return nil |
| 142 } | 215 } |
| 143 | 216 |
| 144 func init() { | 217 func init() { |
| 218 proto.RegisterEnum("protocol.ButlerMetadata_ContentType", ButlerMetadata
_ContentType_name, ButlerMetadata_ContentType_value) |
| 145 } | 219 } |
| OLD | NEW |