solr_api

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallCollectionsApi

func CallCollectionsApi(cloud *solr.SolrCloud, urlParams url.Values, httpHeaders map[string]string, response interface{}) (err error)

func CheckForCollectionsApiError

func CheckForCollectionsApiError(action string, header SolrResponseHeader) (hasError bool, err error)

func CollectionsAPIError

func CollectionsAPIError(action string, responseStatus int) error

func SetMTLSHttpClient

func SetMTLSHttpClient(client *http.Client)

func SetNoVerifyTLSHttpClient

func SetNoVerifyTLSHttpClient(client *http.Client)

Types

type APIError

type APIError struct {
	Detail string
	Status int // API-specific error code
}

func (APIError) Error

func (e APIError) Error() string

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"`

	// +optional
	Status SolrAsyncStatus `json:"status"`
}

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
	AsyncState string `json:"state"`

	Message string `json:"msg"`
}

type SolrClusterStatus

type SolrClusterStatus struct {
	// +optional
	Collections map[string]SolrCollectionStatus `json:"collections"`

	// +optional
	Aliases map[string]string `json:"aliases"`

	// +optional
	Roles map[string][]string `json:"roles"`

	// +optional
	LiveNodes []string `json:"live_nodes"`
}

type SolrClusterStatusResponse

type SolrClusterStatusResponse struct {
	ResponseHeader SolrResponseHeader `json:"responseHeader"`

	// +optional
	ClusterStatus SolrClusterStatus `json:"cluster"`
}

type SolrCollectionRouter

type SolrCollectionRouter struct {
	Name CollectionRouterName `json:"name"`
}

type SolrCollectionStatus

type SolrCollectionStatus struct {
	// +optional
	Shards map[string]SolrShardStatus `json:"shards"`

	// +optional
	ConfigName string `json:"configName"`

	// +optional
	ZnodeVersion string `json:"znodeVersion"`

	// +optional
	AutoAddReplicas string `json:"autoAddReplicas"`

	// +optional
	NrtReplicas int `json:"nrtReplicas"`

	// +optional
	TLogReplicas int `json:"tlogReplicas"`

	// +optional
	PullReplicas int `json:"pullReplicas"`

	// +optional
	MaxShardsPerNode string `json:"maxShardsPerNode"`

	// +optional
	ReplicationFactor string `json:"replicationFactor"`

	// +optional
	Router SolrCollectionRouter `json:"router"`
}

type SolrOverseerStatusResponse

type SolrOverseerStatusResponse struct {
	ResponseHeader SolrResponseHeader `json:"responseHeader"`

	// +optional
	Leader string `json:"leader"`

	// +optional
	QueueSize int `json:"overseer_queue_size"`

	// +optional
	WorkQueueSize int `json:"overseer_work_queue_size"`

	// +optional
	CollectionQueueSize int `json:"overseer_collection_queue_size"`
}

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"`
}

type SolrReplicaType

type SolrReplicaType string
const (
	NRT  SolrReplicaType = "NRT"
	TLOG SolrReplicaType = "TLOG"
	PULL SolrReplicaType = "PULL"
)

type SolrResponseHeader

type SolrResponseHeader struct {
	Status int `json:"status"`

	QTime int `json:"QTime"`
}

type SolrShardState

type SolrShardState string
const (
	ShardActive SolrShardState = "active"
	ShardDown   SolrShardState = "down"
)

type SolrShardStatus

type SolrShardStatus struct {
	// +optional
	Replicas map[string]SolrReplicaStatus `json:"replicas"`

	// +optional
	Range string `json:"range"`

	// +optional
	State SolrShardState `json:"state"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL