Skip to content

Commit d20b7fc

Browse files
committed
feature: getLogs response with headers
1 parent a9c91db commit d20b7fc

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

Diff for: config.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const (
2222

2323
GetLogsQueryInfo = "X-Log-Query-Info"
2424
HasSQLHeader = "x-log-has-sql"
25-
ETLVersion = 2
25+
ETLVersion = 2
2626
ETLType = "ETL"
2727
ETLSinksType = "AliyunLOG"
2828
)

Diff for: log_store.go

+1
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,7 @@ func (s *LogStore) getLogs(req *GetLogRequest) (*http.Response, []byte, *GetLogs
582582
Count: count,
583583
Contents: contents,
584584
HasSQL: hasSQL,
585+
Header: r.Header,
585586
}, nil
586587
}
587588

Diff for: model.go

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package sls
22

33
import (
44
"encoding/json"
5+
"net/http"
56
"net/url"
67
"strconv"
78
"strings"
@@ -58,6 +59,7 @@ type GetLogsResponse struct {
5859
Logs []map[string]string `json:"logs"`
5960
Contents string `json:"contents"`
6061
HasSQL bool `json:"hasSQL"`
62+
Header http.Header `json:"header"`
6163
}
6264

6365
// GetLogLinesResponse defines response from GetLogLines call

0 commit comments

Comments
 (0)