ees

package module
v0.0.0-...-5247eb1 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const PackageName = "component.ees"

Variables

This section is empty.

Functions

func DefaultConfig

func DefaultConfig() *config

DefaultConfig 返回默认配置

Types

type Component

type Component struct {
	Client *elasticsearch.Client
	// contains filtered or unexported fields
}

Component ...

type Container

type Container struct {
	// contains filtered or unexported fields
}

func DefaultContainer

func DefaultContainer() *Container

func Load

func Load(key string) *Container

func (*Container) Build

func (c *Container) Build(options ...Option) *Component

Build 构建组件

type Option

type Option func(c *Container)

type Transport

type Transport struct {
	// contains filtered or unexported fields
}

Transport for tracing Elastic operations.

func NewTransport

func NewTransport(opts ...TransportOption) *Transport

NewTransport specifies a transport that will trace Elastic and report back via OpenTracing.

func (*Transport) RoundTrip

func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip captures the request and starts an OpenTracing span for Elastic PerformRequest operation.

type TransportOption

type TransportOption func(t *Transport)

TransportOption signature for specifying options, e.g. WithRoundTripper.

func WithRoundTripper

func WithRoundTripper(rt http.RoundTripper) TransportOption

WithRoundTripper specifies the http.RoundTripper to call next after this transport. If it is nil (default), the transport will use http.DefaultTransport.

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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