| 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. |
| 25 type ButlerLogBundle struct { | 87 type ButlerLogBundle struct { |
| 26 // | 88 // |
| 27 // String describing the source of this LogBundle. | 89 // String describing the source of this LogBundle. |
| 28 // This is an unstructured field, and is not intended to be parsed. An | 90 // This is an unstructured field, and is not intended to be parsed. An |
| 29 // example would be: "Butler @a33967 (Linux/amd64)". | 91 // example would be: "Butler @a33967 (Linux/amd64)". |
| 30 // | 92 // |
| 31 // This field will be used for debugging and internal accounting. | 93 // This field will be used for debugging and internal accounting. |
| 32 Source *string `protobuf:"bytes,1,opt,name=source" json:"source,omitempt
y"` | 94 Source *string `protobuf:"bytes,1,opt,name=source" json:"source,omitempt
y"` |
| 33 // The timestamp when this bundle was generated. | 95 // The timestamp when this bundle was generated. |
| 34 // | 96 // |
| 35 // This field will be used for debugging and internal accounting. | 97 // This field will be used for debugging and internal accounting. |
| 36 Timestamp *Timestamp `protobuf:"bytes,2,opt,name=timestamp" json:"timest
amp,omitempty"` | 98 Timestamp *Timestamp `protobuf:"bytes,2,opt,name=timestamp" json:"timest
amp,omitempty"` |
| 99 // |
| 100 // The log prefix's secret value (required). |
| 101 // |
| 102 // The secret is generated by the Butler and unique to this specific log |
| 103 // stream. The Coordinator will record the secret associated with a give
n |
| 104 // log Prefix/Stream, but will not share the secret with a client. |
| 105 // |
| 106 // The Collector will check the secret prior to ingesting logs. If the |
| 107 // secret doesn't match the value recorded by the Coordinator, the log |
| 108 // will be discarded. |
| 109 // |
| 110 // This ensures that only the Butler instance that generated the log str
eam |
| 111 // can emit log data for that stream. |
| 112 Secret []byte `protobuf:"bytes,3,opt,name=secret" json:"secret,omitempty
"` |
| 37 // * | 113 // * |
| 38 // Each Entry is an individual set of log records for a given log stream
. | 114 // Each Entry is an individual set of log records for a given log stream
. |
| 39 » Entries []*ButlerLogBundle_Entry `protobuf:"bytes,5,rep,name=en
tries" json:"entries,omitempty"` | 115 » Entries []*ButlerLogBundle_Entry `protobuf:"bytes,4,rep,name=en
tries" json:"entries,omitempty"` |
| 40 XXX_unrecognized []byte `json:"-"` | 116 XXX_unrecognized []byte `json:"-"` |
| 41 } | 117 } |
| 42 | 118 |
| 43 func (m *ButlerLogBundle) Reset() { *m = ButlerLogBundle{} } | 119 func (m *ButlerLogBundle) Reset() { *m = ButlerLogBundle{} } |
| 44 func (m *ButlerLogBundle) String() string { return proto.CompactTextString(m) } | 120 func (m *ButlerLogBundle) String() string { return proto.CompactTextString(m) } |
| 45 func (*ButlerLogBundle) ProtoMessage() {} | 121 func (*ButlerLogBundle) ProtoMessage() {} |
| 46 | 122 |
| 47 func (m *ButlerLogBundle) GetSource() string { | 123 func (m *ButlerLogBundle) GetSource() string { |
| 48 if m != nil && m.Source != nil { | 124 if m != nil && m.Source != nil { |
| 49 return *m.Source | 125 return *m.Source |
| 50 } | 126 } |
| 51 return "" | 127 return "" |
| 52 } | 128 } |
| 53 | 129 |
| 54 func (m *ButlerLogBundle) GetTimestamp() *Timestamp { | 130 func (m *ButlerLogBundle) GetTimestamp() *Timestamp { |
| 55 if m != nil { | 131 if m != nil { |
| 56 return m.Timestamp | 132 return m.Timestamp |
| 57 } | 133 } |
| 58 return nil | 134 return nil |
| 59 } | 135 } |
| 60 | 136 |
| 137 func (m *ButlerLogBundle) GetSecret() []byte { |
| 138 if m != nil { |
| 139 return m.Secret |
| 140 } |
| 141 return nil |
| 142 } |
| 143 |
| 61 func (m *ButlerLogBundle) GetEntries() []*ButlerLogBundle_Entry { | 144 func (m *ButlerLogBundle) GetEntries() []*ButlerLogBundle_Entry { |
| 62 if m != nil { | 145 if m != nil { |
| 63 return m.Entries | 146 return m.Entries |
| 64 } | 147 } |
| 65 return nil | 148 return nil |
| 66 } | 149 } |
| 67 | 150 |
| 68 // | 151 // |
| 69 // A bundle Entry describes a set of LogEntry messages originating from the | 152 // A bundle Entry describes a set of LogEntry messages originating from the |
| 70 // same log stream. | 153 // same log stream. |
| 71 type ButlerLogBundle_Entry struct { | 154 type ButlerLogBundle_Entry struct { |
| 72 // | 155 // |
| 73 // The descriptor for this entry's log stream. | 156 // The descriptor for this entry's log stream. |
| 74 // | 157 // |
| 75 // Each LogEntry in the "logs" field is shares this common descriptor. | 158 // Each LogEntry in the "logs" field is shares this common descriptor. |
| 76 Desc *LogStreamDescriptor `protobuf:"bytes,1,opt,name=desc" json:"desc,o
mitempty"` | 159 Desc *LogStreamDescriptor `protobuf:"bytes,1,opt,name=desc" json:"desc,o
mitempty"` |
| 77 // | 160 // |
| 78 // The log stream's secret value (required). | |
| 79 // | |
| 80 // The secret is generated by the Butler and unique to this specific log | |
| 81 // stream. The Coordinator will record the secret associated with a give
n | |
| 82 // log Prefix/Stream, but will not share the secret with a client. | |
| 83 // | |
| 84 // The Collector will check the secret prior to ingesting logs. If the | |
| 85 // secret doesn't match the value recorded by the Coordinator, the log | |
| 86 // will be discarded. | |
| 87 // | |
| 88 // This ensures that only the Butler instance that generated the log str
eam | |
| 89 // can emit log data for that stream. | |
| 90 Secret []byte `protobuf:"bytes,2,opt,name=secret" json:"secret,omitempty
"` | |
| 91 // | |
| 92 // Whether this log entry terminates its stream. | 161 // Whether this log entry terminates its stream. |
| 93 // | 162 // |
| 94 // If present and "true", this field declares that this Entry is the las
t | 163 // 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 | 164 // 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 | 165 // 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 | 166 // 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. | 167 // all messages in that range have been received, the log may be archive
d. |
| 99 // | 168 // |
| 100 // Further log entries belonging to this stream with stream indices | 169 // Further log entries belonging to this stream with stream indices |
| 101 // exceeding the terminal log's index will be discarded. | 170 // exceeding the terminal log's index will be discarded. |
| 102 Terminal *bool `protobuf:"varint,3,opt,name=terminal" json:"terminal,omi
tempty"` | 171 Terminal *bool `protobuf:"varint,3,opt,name=terminal" json:"terminal,omi
tempty"` |
| 103 // | 172 // |
| 173 // If terminal is true, this is the terminal stream index; that is, the
last |
| 174 // message index in the stream. |
| 175 TerminalIndex *uint32 `protobuf:"varint,4,opt,name=terminal_index" json:
"terminal_index,omitempty"` |
| 176 // |
| 104 // Log entries attached to this record. These must be sequential and in | 177 // Log entries attached to this record. These must be sequential and in |
| 105 // order. | 178 // order. |
| 106 // | 179 // |
| 107 // This is the main log entry content. | 180 // This is the main log entry content. |
| 108 » Logs []*LogEntry `protobuf:"bytes,4,rep,name=logs" json:"log
s,omitempty"` | 181 » Logs []*LogEntry `protobuf:"bytes,5,rep,name=logs" json:"log
s,omitempty"` |
| 109 XXX_unrecognized []byte `json:"-"` | 182 XXX_unrecognized []byte `json:"-"` |
| 110 } | 183 } |
| 111 | 184 |
| 112 func (m *ButlerLogBundle_Entry) Reset() { *m = ButlerLogBundle_Entry{} } | 185 func (m *ButlerLogBundle_Entry) Reset() { *m = ButlerLogBundle_Entry{} } |
| 113 func (m *ButlerLogBundle_Entry) String() string { return proto.CompactTextString
(m) } | 186 func (m *ButlerLogBundle_Entry) String() string { return proto.CompactTextString
(m) } |
| 114 func (*ButlerLogBundle_Entry) ProtoMessage() {} | 187 func (*ButlerLogBundle_Entry) ProtoMessage() {} |
| 115 | 188 |
| 116 func (m *ButlerLogBundle_Entry) GetDesc() *LogStreamDescriptor { | 189 func (m *ButlerLogBundle_Entry) GetDesc() *LogStreamDescriptor { |
| 117 if m != nil { | 190 if m != nil { |
| 118 return m.Desc | 191 return m.Desc |
| 119 } | 192 } |
| 120 return nil | 193 return nil |
| 121 } | 194 } |
| 122 | 195 |
| 123 func (m *ButlerLogBundle_Entry) GetSecret() []byte { | |
| 124 if m != nil { | |
| 125 return m.Secret | |
| 126 } | |
| 127 return nil | |
| 128 } | |
| 129 | |
| 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() uint32 { |
| 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 |