datas

package
v0.0.0-...-f04d356 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AggsAttrTypeValue   = "value"
	AggsAttrTypeBuckets = "buckets"
)

Variables

View Source
var NoDataError = errors.New("no data found")

Functions

func CloseGRPCClient

func CloseGRPCClient() error

func CloseMysqlClient

func CloseMysqlClient() error

func GetRespMap

func GetRespMap(r *esapi.Response) (esRespMapper, error)

GetRespMap 从elasticsearch的Response中获取esRespMap对象

func InitESCli

func InitESCli(conf *EsConfig)

InitESCli 初始化elasticsearch客户端

func InitGRPCClient

func InitGRPCClient(conf *GRPCConfig)

func InitMysqlClient

func InitMysqlClient(conf *MysqlConf)

InitMysqlClient 初始化mysql客户端

Types

type EsClient

type EsClient struct {
	*elasticsearch.Client
}

EsClient elasticsearch客户端的封装

func GetESClient

func GetESClient() (*EsClient, error)

GetESClient 获取elasticsearch客户端的指针

type EsConfig

type EsConfig struct {
	Address []string
}

EsConfig elasticsearch连接配置

type GRPCClient

type GRPCClient struct {
	*grpc.ClientConn
}

func GetGRPCClient

func GetGRPCClient() *GRPCClient

type GRPCConfig

type GRPCConfig struct {
	Host string
	Port int
}

type MysqlClient

type MysqlClient struct {
	*sql.DB
}

MysqlClient mysql客户端的封装

func GetMysqlClient

func GetMysqlClient() *MysqlClient

GetMysqlClient 获取mysql客户端的指针

type MysqlConf

type MysqlConf struct {
	Host     string
	Port     string
	User     string
	Password string
	Schema   string
	URL      string
}

MysqlConf mysql连接配置

Jump to

Keyboard shortcuts

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