-
Notifications
You must be signed in to change notification settings - Fork 0
/
null.go
75 lines (54 loc) · 1.18 KB
/
null.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
package message
import (
"bytes"
"time"
)
type NullMessage struct {
}
type NullTransaction struct {
NullMessage
}
var nullMessage = &NullMessage{}
func (m *NullMessage) Complete() {
}
func (m *NullMessage) GetType() string {
return ""
}
func (m *NullMessage) GetName() string {
return ""
}
func (m *NullMessage) GetStatus() string {
return ""
}
func (m *NullMessage) GetData() *bytes.Buffer {
return nil
}
func (m *NullMessage) GetTime() time.Time {
return time.Now()
}
func (m *NullMessage) SetTime(time time.Time) {
}
func (m *NullMessage) SetTimestamp(timestampMs int64) {
}
func (m *NullMessage) AddData(k string, v ...string) {
}
func (m *NullMessage) SetData(v string) {
}
func (m *NullMessage) SetStatus(status string) {
}
func (t *NullTransaction) GetChildren() []Messager {
return []Messager{}
}
func (t *NullTransaction) GetDuration() time.Duration {
return 0
}
func (t *NullTransaction) SetDuration(duration time.Duration) {
}
func (t *NullTransaction) SetDurationStart(duration time.Time) {
}
func (t *NullTransaction) NewEvent(mtype, name string) Messager {
return nullMessage
}
func (t *NullTransaction) LogEvent(mtype, name string, args ...string) {
return
}