Configure Meilisearch client with custom HTTP settings, proxies, TLS, and timeouts.
// Source: https://github.com/meilisearch/meilisearch-go | License: MIT | Copyright 2020-2025 Meili SAS
// Provided via justclaw.it.com; keep this notice with the code.
package meilisearch
import (
"context"
"crypto/tls"
"encoding/json"
"net"
"net/http"
"net/url"
"time"
)
type meiliOpt struct {
client *http.Client
transport *http.Transport
apiKey string
contentEncoding *encodingOpt
retryOnStatus map[int]bool
disableRetry bool
maxRetries uint8
jsonMarshaler JSONMarshal
jsonUnmarshaler JSONUnmarshal
}
type encodingOpt struct {
encodingType ContentEncoding
level EncodingCompressionLevel
}
type Option func(*meiliOpt)
func _defaultOpts() *meiliOpt {
transport := baseTransport()
return &meiliOpt{
client: &http.Client{
Trans
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key