elasticsearch

package
v3.8.13 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const MaxContentLength = 1 << 16

MaxContentLength ...

Variables

This section is empty.

Functions

func ESTraceServerInterceptor

func ESTraceServerInterceptor(DisableMetric, DisableTrace bool, Addr string) *http.Client

ESTraceServerInterceptor ...

Types

type Client

type Client struct {
	*elastic.Client
	*Config
}

Client --

func NewClient

func NewClient(config *Config) *Client

NewClient ...

func (*Client) Close added in v3.4.2

func (client *Client) Close() error

Close disconnects

type Config

type Config struct {
	URL           []string
	Username      string //账号 root
	Password      string //密码
	DisableMetric bool   // 关闭指标采集
	DisableTrace  bool   // 关闭链路追踪
}

Config ...

type ESTracedTransport

type ESTracedTransport struct {
	*http.Transport
	DisableMetric bool
	DisableTrace  bool
	Addr          string
}

ESTracedTransport ...

func (*ESTracedTransport) RoundTrip

func (t *ESTracedTransport) RoundTrip(r *http.Request) (resp *http.Response, err error)

RoundTrip ...

Jump to

Keyboard shortcuts

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