Documentation ¶
Index ¶
- Constants
- func CallCollectionsApi(ctx context.Context, cloud *solr.SolrCloud, urlParams url.Values, ...) (err error)
- func CallCollectionsApiV2(ctx context.Context, cloud *solr.SolrCloud, urlMethod string, urlPath string, ...) (err error)
- func CheckAsyncRequest(ctx context.Context, cloud *solr.SolrCloud, asyncId string) (asyncState string, message string, err error)
- func CheckForCollectionsApiError(action string, header SolrResponseHeader, errorBody *SolrErrorResponse) (apiUnsupported bool, err error)
- func CollectionsAPIError(action string, responseStatus int) error
- func DeleteAsyncRequest(ctx context.Context, cloud *solr.SolrCloud, asyncId string) (status string, err error)
- func IsNotSupportedApiError(errorBody *SolrErrorResponse) bool
- func SetMTLSHttpClient(client *http.Client)
- func SetNoVerifyTLSHttpClient(client *http.Client)
- type APIError
- type CollectionRouterName
- type SolrAsyncResponse
- type SolrAsyncStatus
- type SolrAsyncStatusResponse
- type SolrBackupListInstance
- type SolrBackupListResponse
- type SolrClusterStatus
- type SolrClusterStatusResponse
- type SolrCollectionRouter
- type SolrCollectionStatus
- type SolrCollectionsListing
- type SolrDeleteRequestStatus
- type SolrErrorMetadata
- type SolrErrorResponse
- type SolrOverseerStatusResponse
- type SolrRebalanceRequest
- type SolrReplaceNodeResponse
- type SolrReplicaState
- type SolrReplicaStatus
- type SolrReplicaType
- type SolrResponseHeader
- type SolrShardState
- type SolrShardStatus
Constants ¶
View Source
const (
HTTP_HEADERS_CONTEXT_KEY = "HTTP_HEADERS"
)
Variables ¶
This section is empty.
Functions ¶
func CallCollectionsApi ¶
func CallCollectionsApiV2 ¶ added in v0.8.0
func CheckAsyncRequest ¶ added in v0.5.0
func CheckForCollectionsApiError ¶
func CheckForCollectionsApiError(action string, header SolrResponseHeader, errorBody *SolrErrorResponse) (apiUnsupported bool, err error)
func CollectionsAPIError ¶
func DeleteAsyncRequest ¶ added in v0.5.0
func IsNotSupportedApiError ¶ added in v0.8.0
func IsNotSupportedApiError(errorBody *SolrErrorResponse) bool
func SetMTLSHttpClient ¶
Types ¶
type CollectionRouterName ¶
type CollectionRouterName string
CollectionRouterName is a string enumeration type that enumerates the ways that documents can be routed for a collection.
const ( ImplicitRouter CollectionRouterName = "implicit" CompositeIdRouter CollectionRouterName = "compositeId" )
type SolrAsyncResponse ¶
type SolrAsyncResponse struct { ResponseHeader SolrResponseHeader `json:"responseHeader"` // +optional RequestId string `json:"requestId,omitempty"` // +optional Status SolrAsyncStatus `json:"status,omitempty"` // +optional Error *SolrErrorResponse `json:"error,omitempty"` }
type SolrAsyncStatus ¶
type SolrAsyncStatus struct { // Possible states can be found here: https://github.com/apache/solr/blob/releases/lucene-solr%2F8.8.1/solr/solrj/src/java/org/apache/solr/client/solrj/response/RequestStatusState.java // +optional AsyncState string `json:"state,omitempty"` // +optional Message string `json:"msg,omitempty"` }
type SolrAsyncStatusResponse ¶ added in v0.5.0
type SolrAsyncStatusResponse struct { ResponseHeader SolrResponseHeader `json:"responseHeader"` // +optional Status SolrAsyncStatus `json:"status,omitempty"` // +optional Error *SolrErrorResponse `json:"error,omitempty"` }
type SolrBackupListInstance ¶ added in v0.7.0
type SolrBackupListResponse ¶ added in v0.7.0
type SolrBackupListResponse struct { ResponseHeader SolrResponseHeader `json:"responseHeader"` Collection string `json:"collection"` // +optional Backups []SolrBackupListInstance `json:"backups,omitempty"` }
type SolrClusterStatus ¶
type SolrClusterStatus struct { // +optional Collections map[string]SolrCollectionStatus `json:"collections,omitempty"` // +optional Aliases map[string]string `json:"aliases,omitempty"` // +optional Roles map[string][]string `json:"roles,omitempty"` // +optional LiveNodes []string `json:"live_nodes,omitempty"` }
type SolrClusterStatusResponse ¶
type SolrClusterStatusResponse struct { ResponseHeader SolrResponseHeader `json:"responseHeader"` // +optional ClusterStatus SolrClusterStatus `json:"cluster,omitempty"` // +optional Error *SolrErrorResponse `json:"error,omitempty"` }
type SolrCollectionRouter ¶
type SolrCollectionRouter struct {
Name CollectionRouterName `json:"name"`
}
type SolrCollectionStatus ¶
type SolrCollectionStatus struct { // +optional Shards map[string]SolrShardStatus `json:"shards,omitempty"` // +optional ConfigName string `json:"configName,omitempty"` // +optional ZnodeVersion intstr.IntOrString `json:"znodeVersion,omitempty"` // +optional AutoAddReplicas string `json:"autoAddReplicas,omitempty"` // +optional NrtReplicas intstr.IntOrString `json:"nrtReplicas,omitempty"` // +optional TLogReplicas intstr.IntOrString `json:"tlogReplicas,omitempty"` // +optional PullReplicas intstr.IntOrString `json:"pullReplicas,omitempty"` // +optional MaxShardsPerNode intstr.IntOrString `json:"maxShardsPerNode,omitempty"` // +optional ReplicationFactor intstr.IntOrString `json:"replicationFactor,omitempty"` // +optional Router SolrCollectionRouter `json:"router,omitempty"` }
type SolrCollectionsListing ¶ added in v0.7.0
type SolrCollectionsListing struct { ResponseHeader SolrResponseHeader `json:"responseHeader"` // +optional Collections []string `json:"collections,omitempty"` // +optional Error *SolrErrorResponse `json:"error,omitempty"` }
type SolrDeleteRequestStatus ¶ added in v0.5.0
type SolrDeleteRequestStatus struct { ResponseHeader SolrResponseHeader `json:"responseHeader"` // Status of the delete request // +optional Status string `json:"status,omitempty"` // +optional Error *SolrErrorResponse `json:"error,omitempty"` }
type SolrErrorMetadata ¶ added in v0.8.0
type SolrErrorResponse ¶ added in v0.8.0
type SolrErrorResponse struct { Metadata SolrErrorMetadata `json:"metadata,omitempty"` Message string `json:"msg,omitempty"` Code int `json:"code,omitempty"` }
func (SolrErrorResponse) Error ¶ added in v0.8.0
func (e SolrErrorResponse) Error() string
type SolrOverseerStatusResponse ¶
type SolrOverseerStatusResponse struct { ResponseHeader SolrResponseHeader `json:"responseHeader"` // +optional Leader string `json:"leader,omitempty"` // +optional QueueSize int `json:"overseer_queue_size,omitempty"` // +optional WorkQueueSize int `json:"overseer_work_queue_size,omitempty"` // +optional CollectionQueueSize int `json:"overseer_collection_queue_size,omitempty"` // +optional Error *SolrErrorResponse `json:"error,omitempty"` }
type SolrRebalanceRequest ¶ added in v0.8.0
type SolrReplaceNodeResponse ¶ added in v0.5.0
type SolrReplaceNodeResponse struct { ResponseHeader SolrResponseHeader `json:"responseHeader"` // +optional Success string `json:"success,omitempty"` // +optional Failure string `json:"failure,omitempty"` }
type SolrReplicaState ¶
type SolrReplicaState string
const ( ReplicaActive SolrReplicaState = "active" ReplicaDown SolrReplicaState = "down" ReplicaRecovering SolrReplicaState = "recovering" ReplicaRecoveryFailed SolrReplicaState = "recovery_failed" )
type SolrReplicaStatus ¶
type SolrReplicaStatus struct { State SolrReplicaState `json:"state"` Core string `json:"core"` NodeName string `json:"node_name"` BaseUrl string `json:"base_url"` Leader bool `json:"leader,string"` // +optional Type SolrReplicaType `json:"type,omitempty"` }
type SolrReplicaType ¶
type SolrReplicaType string
const ( NRT SolrReplicaType = "NRT" TLOG SolrReplicaType = "TLOG" PULL SolrReplicaType = "PULL" )
type SolrResponseHeader ¶
type SolrShardState ¶
type SolrShardState string
const ( ShardActive SolrShardState = "active" ShardDown SolrShardState = "down" )
type SolrShardStatus ¶
type SolrShardStatus struct { // +optional Replicas map[string]SolrReplicaStatus `json:"replicas,omitempty"` // +optional Range string `json:"range,omitempty"` // +optional State SolrShardState `json:"state,omitempty"` }
Click to show internal directories.
Click to hide internal directories.