Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudEvent ¶
type CloudEvent struct {
SpecVersion string `json:"specversion"`
Type string `json:"type"`
Source string `json:"source"`
ID string `json:"id"`
Time string `json:"time"`
DataContentType string `json:"datacontenttype"`
Token string `json:"token,omitempty"`
Data map[string]interface{} `json:"data"`
}
CloudEvent 遵循 CloudEvents 1.0 规范
type CoredumpUploadedData ¶
type CoredumpUploadedData struct {
FileURL string `json:"file_url"`
FileName string `json:"file_name"`
ExecutablePath string `json:"executable_path"`
FileSize int64 `json:"file_size"`
MD5 string `json:"md5"`
Image string `json:"image"`
Timestamp string `json:"timestamp"`
PodName string `json:"pod_name"`
PodNamespace string `json:"pod_namespace"`
NodeIP string `json:"node_ip,omitempty"` // Pod 所在节点的 IP,从 status.hostIP 获取
}
CoredumpUploadedData 上传成功的 core dump 数据
type Reporter ¶
type Reporter struct {
// contains filtered or unexported fields
}
Reporter 负责向 CoreSight 上报事件(通过 HTTP API)
func NewReporterWithToken ¶
NewReporterWithToken 创建新的 reporter(使用 HTTP API,并设置 token)
func (*Reporter) ReportCoredumpUploaded ¶
func (r *Reporter) ReportCoredumpUploaded(ctx context.Context, data *CoredumpUploadedData) error
ReportCoredumpUploaded 上报 coredump 上传事件到 CoreSight
Click to show internal directories.
Click to hide internal directories.