client

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const MaxLimit = 10000

MaxLimit is the size used in aggs

Variables

This section is empty.

Functions

func CheckAggsField

func CheckAggsField(field string, needReplace bool) (string, string, error)

检查聚合字段格式是否正确,如sum(success)

func CheckInterfaceString

func CheckInterfaceString(a []interface{}) ([]string, error)

CheckInterfaceString 检查一个[]interface{}中的元素是否都为string

func GetTables

func GetTables(indices []string, tableName string, startTime int64, endTime int64) string

GetTables get some indices according timestamp

func GetTablesMonitor

func GetTablesMonitor(indices []string, tableName string, startTime int64, endTime int64) string

GetTablesMonitor get some indices according timestamp

Types

type Client

type Client struct {
	URL      string
	Username string
	Password string
}

Client is a ElasticSearch Client

func (*Client) Indices

func (c *Client) Indices() ([]string, error)

func (*Client) Query

func (c *Client) Query(table string, startTime int64, endTime int64, orderBy string, order string, limit int32,
	offset int32, conditions []interface{}, groupBy []string, fields []string) ([]string, []interface{}, error)

func (*Client) QueryMonitor

func (c *Client) QueryMonitor(table string, startTime int64, endTime int64, orderBy string, order string, limit int32,
	offset int32, conditions []interface{}, groupBy []string, fields []string) ([]string, []interface{}, error)

func (*Client) SimpleQuery

func (c *Client) SimpleQuery(table string) ([]interface{}, error)

Jump to

Keyboard shortcuts

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