Documentation ¶
Index ¶
- Constants
- func ClearESLog()
- func CreateIndex(indexName string)
- func DeleteIndex(indexName string) interface{}
- func GetEsStatus() int
- func GetIndexPre() string
- func GroupField(indexName, field string, size, minCount int, excludeValues []string) []byte
- func Init()
- func InsertEsLog(logInfo interface{})
- func TestLog()
- type IndexInfo
- type QueryParams
- type ServerLogData
- type ServerLogModel
Constants ¶
View Source
const ( NewTermQuery = "NewTermQuery" NewMatchPhraseQuery = "NewMatchPhraseQuery" NewRegexpQuery = "NewRegexpQuery" NewTermQueryNotMust = "NewTermQueryNotMust" NewMatchPhraseQueryNotMust = "NewMatchPhraseQueryNotMust" NewRegexpQueryNotMust = "NewRegexpQueryNotMust" )
Variables ¶
This section is empty.
Functions ¶
func ClearESLog ¶ added in v0.0.68
func ClearESLog()
func CreateIndex ¶ added in v0.0.28
func CreateIndex(indexName string)
func DeleteIndex ¶
func DeleteIndex(indexName string) interface{}
func GetEsStatus ¶ added in v0.0.84
func GetEsStatus() int
func GetIndexPre ¶ added in v0.0.23
func GetIndexPre() string
func GroupField ¶
func InsertEsLog ¶
func InsertEsLog(logInfo interface{})
Types ¶
type IndexInfo ¶
type QueryParams ¶ added in v0.0.22
type ServerLogData ¶ added in v0.0.39
type ServerLogData struct { Id string `json:"id"` ServerName string `json:"serverName"` Env string `json:"env"` TimeStamp int64 `json:"timeStamp"` ThreadNo string `json:"threadNo"` ServerIp string `json:"serverIp"` ClientIp string `json:"clientIp"` Token string `json:"token"` CustomerId int32 `json:"customerId"` ClientSource string `json:"clientSource"` //请求中所有header信息 Url string `json:"url"` Method string `json:"method"` Request string `json:"request"` Response string `json:"response"` DealTimes int64 `json:"dealTimes"` }
func QueryLogs ¶
func QueryLogs(indexName string, params []QueryParams, sortsDesc map[string]bool, from, size int) (total int64, data []ServerLogData)
func QueryLogsForApi ¶ added in v0.2.6
func QueryLogsForApi(c *gin.Context, indexName string, params []QueryParams, sortsDesc map[string]bool, from, size int) (total int64, data []ServerLogData)
type ServerLogModel ¶
type ServerLogModel struct { ServerName string `json:"serverName"` Env string `json:"env"` TimeStamp int64 `json:"timeStamp"` ThreadNo string `json:"threadNo"` ServerIp string `json:"serverIp"` ClientIp string `json:"clientIp"` Token string `json:"token"` CustomerId int32 `json:"customerId"` ClientSource string `json:"clientSource"` Url string `json:"url"` Method string `json:"method"` Request string `json:"request"` Response string `json:"response"` DealTimes int64 `json:"dealTimes"` }
Click to show internal directories.
Click to hide internal directories.