first commit

This commit is contained in:
2024-07-23 10:23:43 +08:00
commit 7b4c2521a3
126 changed files with 15931 additions and 0 deletions

17
pkg/trace/grpc.go Normal file
View File

@ -0,0 +1,17 @@
package trace
import (
"google.golang.org/grpc/metadata"
)
type Grpc struct {
Timestamp string `json:"timestamp"` // 时间格式2006-01-02 15:04:05
Addr string `json:"addr"` // 地址
Method string `json:"method"` // 操作方法
Meta metadata.MD `json:"meta"` // Mate
Request map[string]any `json:"request"` // 请求信息
Response map[string]any `json:"response"` // 返回信息
CostSeconds float64 `json:"cost_seconds"` // 执行时间(单位秒)
Code string `json:"err_code,omitempty"` // 错误码
Message string `json:"err_message,omitempty"` // 错误信息
}