Skip to content

Commit

Permalink
feature: getLogs response with headers
Browse files Browse the repository at this point in the history
  • Loading branch information
syaning committed Nov 11, 2022
1 parent a9c91db commit d20b7fc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const (

GetLogsQueryInfo = "X-Log-Query-Info"
HasSQLHeader = "x-log-has-sql"
ETLVersion = 2
ETLVersion = 2
ETLType = "ETL"
ETLSinksType = "AliyunLOG"
)
1 change: 1 addition & 0 deletions log_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,7 @@ func (s *LogStore) getLogs(req *GetLogRequest) (*http.Response, []byte, *GetLogs
Count: count,
Contents: contents,
HasSQL: hasSQL,
Header: r.Header,
}, nil
}

Expand Down
2 changes: 2 additions & 0 deletions model.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package sls

import (
"encoding/json"
"net/http"
"net/url"
"strconv"
"strings"
Expand Down Expand Up @@ -58,6 +59,7 @@ type GetLogsResponse struct {
Logs []map[string]string `json:"logs"`
Contents string `json:"contents"`
HasSQL bool `json:"hasSQL"`
Header http.Header `json:"header"`
}

// GetLogLinesResponse defines response from GetLogLines call
Expand Down

0 comments on commit d20b7fc

Please sign in to comment.