Documentation ¶
Index ¶
- func Cert(cert string) func(*solrHttp)
- func ClusterStateVersion(version int, collection string) func(url.Values)
- func Commit(commit bool) func(url.Values)
- func CommitWithin(duration time.Duration) func(url.Values)
- func ConnectionTimeout(seconds int) func(*solrHttp)
- func Cursor(c string) func(url.Values)
- func DebugTiming() func(url.Values)
- func DefaultRows(rows uint32) func(*solrHttp)
- func DeleteStreamBody(filter string) func(url.Values)
- func FilterQuery(fq string) func(url.Values)
- func GetDocIdFromDoc(m map[string]interface{}) string
- func GetVersionFromDoc(m map[string]interface{}) int
- func HTTPClient(cli HTTPer) func(*solrHttp)
- func Hash(key CompositeKey) int32
- func HttpLogger(logger Logger) func(*solrHttp)
- func InsecureSkipVerify(insecureSkipVerify bool) func(*solrHttp)
- func MinRF(minRf int) func(*solrHttp)
- func NewSolrBatchError(err error) error
- func NewSolrError(status int, message string) error
- func NewSolrInternalError(status int, message string) error
- func NewSolrLeaderError(docID string) error
- func NewSolrMapParseError(bucket string, userId int, m map[string]interface{}) error
- func NewSolrParseError(status int, message string) error
- func NewSolrRFError(rf, minRF int) error
- func Password(password string) func(*solrHttp)
- func PreferLocalShards(preferLocalShards bool) func(url.Values)
- func Query(q string) func(url.Values)
- func QueryRouter(router Router) func(*solrHttp)
- func ReadTimeout(seconds int) func(*solrHttp)
- func Route(r string) func(url.Values)
- func Rows(rows uint32) func(url.Values)
- func SleepTimeMS(sleepTimeMS int) func(*solrZkInstance)
- func SolrZKLogger(logger Logger) func(s *solrZkInstance)
- func Sort(s string) func(url.Values)
- func Start(start uint32) func(url.Values)
- func UrlVals(urlVals url.Values) func(url.Values)
- func User(user string) func(*solrHttp)
- func WithVersions() func(url.Values)
- func WriteTimeout(seconds int) func(*solrHttp)
- type Adds
- type ClusterProps
- type ClusterState
- type Collection
- type CompositeKey
- type Debug
- type DeleteRequest
- type HTTPer
- type HashRange
- type HttpError
- type Logger
- type Replica
- type Response
- type Router
- type Shard
- type SolrBatchError
- type SolrError
- type SolrHTTP
- type SolrHealthcheckResponse
- type SolrHttpRetrier
- type SolrInternalError
- type SolrLeaderError
- type SolrLocator
- type SolrLogger
- type SolrMapParseError
- type SolrMinRFError
- type SolrParseError
- type SolrResponse
- type SolrZK
- type StageTiming
- type Timing
- type UpdateResponse
- type Zookeeper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClusterStateVersion ¶
func ConnectionTimeout ¶
func ConnectionTimeout(seconds int) func(*solrHttp)
func DebugTiming ¶
func DefaultRows ¶
func DefaultRows(rows uint32) func(*solrHttp)
DefaultRows sets number of rows for pagination in calls that don't pass a number of rows in
func DeleteStreamBody ¶
func FilterQuery ¶
Helper funcs for setting the solr query params
func GetDocIdFromDoc ¶
func GetVersionFromDoc ¶
func Hash ¶
func Hash(key CompositeKey) int32
func HttpLogger ¶
func HttpLogger(logger Logger) func(*solrHttp)
func InsecureSkipVerify ¶
func InsecureSkipVerify(insecureSkipVerify bool) func(*solrHttp)
func NewSolrBatchError ¶
func NewSolrError ¶
func NewSolrInternalError ¶
func NewSolrLeaderError ¶
func NewSolrMapParseError ¶
func NewSolrParseError ¶
func NewSolrRFError ¶
func PreferLocalShards ¶
func QueryRouter ¶
func QueryRouter(router Router) func(*solrHttp)
func ReadTimeout ¶
func ReadTimeout(seconds int) func(*solrHttp)
func SleepTimeMS ¶
func SleepTimeMS(sleepTimeMS int) func(*solrZkInstance)
func SolrZKLogger ¶
func SolrZKLogger(logger Logger) func(s *solrZkInstance)
func WithVersions ¶
func WriteTimeout ¶
func WriteTimeout(seconds int) func(*solrHttp)
Types ¶
type ClusterProps ¶
type ClusterProps struct {
UrlScheme string `json:"urlScheme"`
}
type ClusterState ¶
type ClusterState struct { LiveNodes []string Version int Collections map[string]Collection }
type Collection ¶
type CompositeKey ¶
func NewCompositeKey ¶
func NewCompositeKey(id string) (CompositeKey, error)
type DeleteRequest ¶
type DeleteRequest struct {
Delete []string `json:"delete"`
}
type HashRange ¶
func ConvertToHashRange ¶
type Router ¶
func NewRoundRobinRouter ¶
func NewRoundRobinRouter() Router
type SolrBatchError ¶
type SolrBatchError struct {
// contains filtered or unexported fields
}
type SolrHTTP ¶
type SolrHTTP interface { Select(nodeUris []string, opts ...func(url.Values)) (SolrResponse, error) Update(nodeUris []string, singleDoc bool, doc interface{}, opts ...func(url.Values)) (UpdateResponse, error) Logger() Logger }
func NewSolrHTTP ¶
type SolrHealthcheckResponse ¶
type SolrHttpRetrier ¶
type SolrHttpRetrier struct {
// contains filtered or unexported fields
}
func (*SolrHttpRetrier) Logger ¶
func (s *SolrHttpRetrier) Logger() Logger
func (*SolrHttpRetrier) Select ¶
func (s *SolrHttpRetrier) Select(nodeUris []string, opts ...func(url.Values)) (SolrResponse, error)
func (*SolrHttpRetrier) Update ¶
func (s *SolrHttpRetrier) Update(nodeUris []string, jsonDocs bool, doc interface{}, opts ...func(url.Values)) (response UpdateResponse, err error)
type SolrInternalError ¶
type SolrInternalError struct {
SolrError
}
type SolrLeaderError ¶
type SolrLeaderError struct {
SolrError
}
type SolrLocator ¶
type SolrLogger ¶
func (*SolrLogger) Debug ¶
func (l *SolrLogger) Debug(v ...interface{})
func (*SolrLogger) Error ¶
func (l *SolrLogger) Error(err error)
func (*SolrLogger) Info ¶
func (l *SolrLogger) Info(v ...interface{})
func (*SolrLogger) Printf ¶
func (l *SolrLogger) Printf(format string, v ...interface{})
type SolrMapParseError ¶
type SolrMapParseError struct {
// contains filtered or unexported fields
}
func (SolrMapParseError) Error ¶
func (err SolrMapParseError) Error() string
type SolrMinRFError ¶
type SolrParseError ¶
type SolrParseError struct {
SolrError
}
type SolrResponse ¶
type SolrResponse struct { Status int `json:"status"` QTime int `json:"qtime"` Params struct { Query string `json:"q"` Indent string `json:"indent"` Wt string `json:"wt"` } `json:"params"` Response Response `json:"response"` Debug *Debug `json:"debug"` NextCursorMark string `json:"nextCursorMark"` Adds Adds `json:"adds"` }
type SolrZK ¶
type SolrZK interface { GetZookeepers() string GetClusterState() (ClusterState, error) GetClusterProps() (ClusterProps, error) Listen(user, pwd string) error Listening() bool GetSolrLocator() SolrLocator UseHTTPS() (bool, error) }
type StageTiming ¶
type StageTiming struct {
Time float64 `json:"time"`
}
type Timing ¶
type Timing struct { Time float64 `json:"time"` Prepare StageTiming `json:"prepare"` Process StageTiming `json:"process"` }
type UpdateResponse ¶
type UpdateResponse struct { Response struct { Status int `json:"status"` QTime int `json:"QTime"` RF int `json:"rf"` MinRF int `json:"min_rf"` } `json:"responseHeader"` // <adds> is a weird return value. It mixes ids with versions in a single slice, e.g. // ["id1",1233144,"id2",4122243], to get only the ids call AddedIDs afterwards Adds []interface{} `json:"adds"` Error struct { Metadata []string `json:"metadata"` Msg string `json:"msg"` Code int `json:"code"` } }
type Zookeeper ¶
type Zookeeper interface { IsConnected() bool Connect(user, pwd string) error GetConnectionString() string Get(path string) ([]byte, int, error) Poll(path string, cb stateChanged) GetClusterState() (map[string]Collection, int, error) GetClusterStateW() (map[string]Collection, int, <-chan zk.Event, error) GetLiveNodes() ([]string, error) GetLiveNodesW() ([]string, <-chan zk.Event, error) GetLeaderElectW() (<-chan zk.Event, error) GetClusterProps() (ClusterProps, error) ZKLogger(l Logger) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.