es

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

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 GroupField(indexName, field string, size, minCount int, excludeValues []string) []byte

func Init

func Init()

func InsertEsLog

func InsertEsLog(logInfo interface{})

func TestLog

func TestLog()

Types

type IndexInfo

type IndexInfo struct {
	Name  string `json:"name"`
	Count int    `json:"count"`
	Size  string `json:"size"`
}

func AllIndex

func AllIndex() []IndexInfo

type QueryParams added in v0.0.22

type QueryParams struct {
	Name  string
	Value interface{}
	Type  string
}

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)

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL