mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-03 15:06:36 +08:00
feat(obs): 访问日志 SSOT 与 edge_health,去掉协议兼容层
Agent 仅上报 host_metrics/edge_health/access_logs;业务流量与 UV 由 Server 侧访问日志聚合。新增 of_node_edge_health 与 of_access_log_hourly, 删除 request_reports/openresty 吞吐路径;API 不再暴露 traffic_reports 与 openresty_rx|tx。心跳/离线默认阈值与回填迁移一并入库。
This commit is contained in:
@@ -11,6 +11,9 @@ import (
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
// formatDetectHeadBytes is the sniff window used for archive format detection.
|
||||
const formatDetectHeadBytes = 512
|
||||
|
||||
// ExtractOptions controls package extraction.
|
||||
type ExtractOptions struct {
|
||||
// Limits bounds files and sizes during extraction when EnforceLimits is true.
|
||||
@@ -55,7 +58,7 @@ func ExtractFile(filePath string, format Format, destDir string, opts ExtractOpt
|
||||
return err
|
||||
}
|
||||
if format == "" {
|
||||
head := make([]byte, 512)
|
||||
head := make([]byte, formatDetectHeadBytes)
|
||||
n, readErr := file.ReadAt(head, 0)
|
||||
if readErr != nil && readErr != io.EOF {
|
||||
return readErr
|
||||
|
||||
@@ -42,7 +42,7 @@ func InspectFile(filePath string, format Format, opts InspectOptions) (*Manifest
|
||||
return nil, err
|
||||
}
|
||||
if format == "" {
|
||||
head := make([]byte, 512)
|
||||
head := make([]byte, formatDetectHeadBytes)
|
||||
n, readErr := file.ReadAt(head, 0)
|
||||
if readErr != nil && readErr != io.EOF {
|
||||
return nil, readErr
|
||||
|
||||
Reference in New Issue
Block a user