|
1 | 1 | package openkitgo
|
2 | 2 |
|
3 |
| -import ( |
4 |
| - "time" |
5 |
| -) |
6 |
| - |
7 |
| -type Action interface { |
8 |
| - // TODO - Implement these |
9 |
| - // ReportEvent(string) |
10 |
| - // ReportIntValue(string, int) |
11 |
| - // ReportDoubleValue(string, float64) |
12 |
| - // ReportStringValue(string, string) |
13 |
| - ReportStringValueAt(string, string, time.Time) |
14 |
| - // ReportError(string, int, string) |
15 |
| - TraceWebRequest(string) *WebRequestTracer |
16 |
| - TraceWebRequestAt(string, time.Time) *WebRequestTracer |
17 |
| - EnterAction(string) Action |
18 |
| - EnterActionAt(string, time.Time) Action |
19 |
| - LeaveAction() |
20 |
| - LeaveActionAt(time.Time) |
21 |
| - |
22 |
| - getName() string |
23 |
| - getParentActionID() int |
24 |
| - getStartTime() time.Time |
25 |
| - getEndTime() time.Time |
| 3 | +import "time" |
| 4 | + |
| 5 | +type IAction interface { |
| 6 | + ReportEvent(eventName string) IAction |
| 7 | + ReportEventAt(eventName string, timestamp time.Time) IAction |
| 8 | + |
| 9 | + ReportInt64Value(valueName string, value int64) IAction |
| 10 | + ReportInt64ValueAt(valueName string, value int64, timestamp time.Time) IAction |
| 11 | + |
| 12 | + ReportStringValue(valueName string, value string) IAction |
| 13 | + ReportStringValueAt(valueName string, value string, timestamp time.Time) IAction |
| 14 | + |
| 15 | + ReportFloat64Value(valueName string, value float64) IAction |
| 16 | + ReportFloat64ValueAt(valueName string, value float64, timestamp time.Time) IAction |
| 17 | + |
| 18 | + ReportError(errorName string, errorCode int) IAction |
| 19 | + ReportErrorAt(errorName string, errorCode int, timestamp time.Time) IAction |
| 20 | + |
| 21 | + ReportException(errorName string, causeName string, causeDescription string, causeStack string) IAction |
| 22 | + ReportExceptionAt(errorName string, causeName string, causeDescription string, causeStack string, timestamp time.Time) IAction |
| 23 | + |
| 24 | + // TODO TraceWebRequest() |
| 25 | + // TODO TraceWebRequestAt() |
| 26 | + |
| 27 | + LeaveAction() IAction |
| 28 | + LeaveActionAt(timestamp time.Time) IAction |
| 29 | + |
| 30 | + CancelAction() IAction |
| 31 | + CancelActionAt(timestamp time.Time) IAction |
| 32 | + |
| 33 | + GetDuration() time.Duration |
26 | 34 | }
|
0 commit comments