优化事件定义
This commit is contained in:
@ -13,10 +13,22 @@ package define
|
||||
//
|
||||
// Date : 11:41 2024/3/11
|
||||
type EventData struct {
|
||||
EventType string `json:"event_type"` // 事件类型
|
||||
TraceID string `json:"trace_id"` // 事件追踪ID
|
||||
Host string `json:"host"` // 触发事件host
|
||||
Timestamp int64 `json:"timestamp"` // 触发时间,纳秒级时间戳
|
||||
SystemTimestamp int64 `json:"system_timestamp"` // 发送时的系统时间
|
||||
Data interface{} `json:"data"` // 发送的数据
|
||||
EventType string `json:"event_type"` // 事件类型
|
||||
TraceID string `json:"trace_id"` // 事件追踪ID
|
||||
Host string `json:"host"` // 触发事件host
|
||||
Timestamp int64 `json:"timestamp"` // 触发时间,纳秒级时间戳
|
||||
SystemTimestamp int64 `json:"system_timestamp"` // 发送时的系统时间
|
||||
Data any `json:"data"` // 发送的数据
|
||||
}
|
||||
|
||||
// SendResult 发送结果
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 15:56 2024/6/25
|
||||
type SendResult struct {
|
||||
Data *EventData `json:"data"` // 发送的数据
|
||||
IsSuccess bool `json:"is_success"` // 是否发送成功
|
||||
FailReason string `json:"fail_reason"` // 失败原因
|
||||
Extension map[string]any `json:"extension"` // 扩展数据
|
||||
}
|
||||
|
Reference in New Issue
Block a user