forked from aShevc/go-zipkin-sample
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LogLinedMessage.go
231 lines (214 loc) · 5.69 KB
/
LogLinedMessage.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
package sample
import (
"github.com/elodina/go-avro"
)
type LogLinedMessage struct {
Logline *LogLine
Payload *Message
}
func NewLogLinedMessage() *LogLinedMessage {
return &LogLinedMessage{
Logline: NewLogLine(),
Payload: NewMessage(),
}
}
func (this *LogLinedMessage) Schema() avro.Schema {
if _LogLinedMessage_schema_err != nil {
panic(_LogLinedMessage_schema_err)
}
return _LogLinedMessage_schema
}
type LogLine struct {
TraceInfo *TraceInfo
}
func NewLogLine() *LogLine {
return &LogLine{}
}
func (this *LogLine) Schema() avro.Schema {
if _LogLine_schema_err != nil {
panic(_LogLine_schema_err)
}
return _LogLine_schema
}
type TraceInfo struct {
SpanId int64
TraceId int64
ParentSpanId interface{}
Sampled bool
}
func NewTraceInfo() *TraceInfo {
return &TraceInfo{
Sampled: false,
}
}
func (this *TraceInfo) Schema() avro.Schema {
if _TraceInfo_schema_err != nil {
panic(_TraceInfo_schema_err)
}
return _TraceInfo_schema
}
type Message struct {
Time int64
Msg string
}
func NewMessage() *Message {
return &Message{}
}
func (this *Message) Schema() avro.Schema {
if _Message_schema_err != nil {
panic(_Message_schema_err)
}
return _Message_schema
}
// Generated by codegen. Please do not modify.
var _LogLinedMessage_schema, _LogLinedMessage_schema_err = avro.ParseSchema(`{
"type": "record",
"namespace": "avro",
"name": "LogLinedMessage",
"fields": [
{
"name": "logline",
"type": {
"type": "record",
"name": "LogLine",
"fields": [
{
"name": "traceInfo",
"default": null,
"type": [
"null",
{
"type": "record",
"name": "TraceInfo",
"fields": [
{
"name": "spanId",
"type": "long"
},
{
"name": "traceId",
"type": "long"
},
{
"name": "parentSpanId",
"default": null,
"type": [
"null",
"long"
]
},
{
"name": "sampled",
"default": false,
"type": "boolean"
}
]
}
]
}
]
}
},
{
"name": "payload",
"type": {
"type": "record",
"name": "Message",
"fields": [
{
"name": "time",
"type": "long"
},
{
"name": "msg",
"type": "string"
}
]
}
}
]
}`)
// Generated by codegen. Please do not modify.
var _LogLine_schema, _LogLine_schema_err = avro.ParseSchema(`{
"type": "record",
"name": "LogLine",
"fields": [
{
"name": "traceInfo",
"default": null,
"type": [
"null",
{
"type": "record",
"name": "TraceInfo",
"fields": [
{
"name": "spanId",
"type": "long"
},
{
"name": "traceId",
"type": "long"
},
{
"name": "parentSpanId",
"default": null,
"type": [
"null",
"long"
]
},
{
"name": "sampled",
"default": false,
"type": "boolean"
}
]
}
]
}
]
}`)
// Generated by codegen. Please do not modify.
var _TraceInfo_schema, _TraceInfo_schema_err = avro.ParseSchema(`{
"type": "record",
"name": "TraceInfo",
"fields": [
{
"name": "spanId",
"type": "long"
},
{
"name": "traceId",
"type": "long"
},
{
"name": "parentSpanId",
"default": null,
"type": [
"null",
"long"
]
},
{
"name": "sampled",
"default": false,
"type": "boolean"
}
]
}`)
// Generated by codegen. Please do not modify.
var _Message_schema, _Message_schema_err = avro.ParseSchema(`{
"type": "record",
"name": "Message",
"fields": [
{
"name": "time",
"type": "long"
},
{
"name": "msg",
"type": "string"
}
]
}`)