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 package and 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 ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents the HTTP client.
func New ¶
New creates new HTTP client.
http.DefaultTransport will be used if no transport is passed in the configuration.
type Config ¶
type Config struct { URLs []*url.URL Transport http.RoundTripper }
Config represents the configuration of HTTP client.
type RoundRobinSelector ¶
RoundRobinSelector implements a round-robin selection strategy.
func NewRoundRobinSelector ¶
func NewRoundRobinSelector(urls ...*url.URL) *RoundRobinSelector
NewRoundRobinSelector creates a new RoundRobinSelector.