estransport
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package estransport provides the transport layer for the Elasticsearch client.
It is automatically included in the client provided by the github.com/elastic/go-elasticsearch packageand is not intended for direct use: to configure the client, use the elasticsearch.Config struct.
At the moment, the implementation is rather minimal: the client takes a slice of url.URL pointers,and round-robins across them when performing the request.
The default HTTP transport of the client is http.Transport.
Index¶
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeClient¶
type Client struct {// contains filtered or unexported fields}Client represents the HTTP client.
funcNew¶
New creates new HTTP client.
http.DefaultTransport will be used if no transportis passed in the configuration.
typeConfig¶
type Config struct {URLs []*url.URLTransporthttp.RoundTripper}Config represents the configuration of HTTP client.
typeRoundRobinSelector¶
RoundRobinSelector implements a round-robin selection strategy.
funcNewRoundRobinSelector¶
func NewRoundRobinSelector(urls ...*url.URL) *RoundRobinSelector
NewRoundRobinSelector creates a new RoundRobinSelector.