Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultConnectTimeout = 2 * time.Second DefaultKeepAliveDuration = 5 * time.Minute DefaultMaxIdleConnsPerHost = 64 DefaultTLSHandshakeTimeout = 2 * time.Second )
View Source
const (
DefaultResetPeriod = 5 * time.Minute
)
Variables ¶
This section is empty.
Functions ¶
func DefaultHTTPClient ¶
DefaultHTTPClient exposes the default *http.Client used by the different Client instances of the Algolia API client.
Most users should not need to access this http.Client.
This helper is only useful for users who wish to keep the default behavior of the Algolia API client (by wrapping it in a user-defined instance of transport.Requester) but would like to wrap it into a middleware layer or pass it to an HTTP interceptor.
Types ¶
type RetryStrategy ¶
func (*RetryStrategy) GetTryableHosts ¶
func (s *RetryStrategy) GetTryableHosts(k call.Kind) (hosts []Host)
type StatefulHost ¶
type StatefulHost struct {
// contains filtered or unexported fields
}
func NewStatefulHost ¶
func NewStatefulHost(host string, accept func(k call.Kind) bool) *StatefulHost
func Shuffle ¶
func Shuffle(hosts []*StatefulHost) []*StatefulHost
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.