Documentation ¶
Index ¶
- Constants
- type ADD
- type ADDList
- type BalanceReplica
- type Client
- func (sc *Client) Balance() error
- func (sc *Client) BalanceReplicaManual(db *dbapi.Solr, desired int) error
- func (sc *Client) CheckupStatus(async string) error
- func (sc *Client) CleanupAsync(async string) error
- func (sc *Client) DecodeCollectionHealth(responseBody map[string]interface{}) error
- func (sc *Client) DecodeResponse(response *Response) (map[string]interface{}, error)
- func (sc *Client) Down(nodeList []string, x int, mp map[string][]CoreList) error
- func (sc *Client) FlushAsyncStatus(asyncId string) error
- func (sc *Client) GetAsyncStatus(responseBody map[string]interface{}) (string, error)
- func (sc *Client) GetCollectionList(responseBody map[string]interface{}) ([]string, error)
- func (sc *Client) GetResponseStatus(responseBody map[string]interface{}) (int, error)
- func (sc *Client) Run(lst []UpdateList) error
- func (sc *Client) SearchCollection(collections []string) bool
- func (sc *Client) Up(nodeList []string, mp map[string][]CoreList) error
- func (sc *Client) UpReplicaManual(db *dbapi.Solr) error
- type ClientOptions
- type Config
- type CoreList
- type CreateParams
- type Data
- type Doc
- type KubeDBClientBuilder
- func (o *KubeDBClientBuilder) GetHostPath(db *api.Solr) string
- func (o *KubeDBClientBuilder) GetSolrClient() (*Client, error)
- func (o *KubeDBClientBuilder) WithContext(ctx context.Context) *KubeDBClientBuilder
- func (o *KubeDBClientBuilder) WithLog(log logr.Logger) *KubeDBClientBuilder
- func (o *KubeDBClientBuilder) WithPod(podName string) *KubeDBClientBuilder
- func (o *KubeDBClientBuilder) WithURL(url string) *KubeDBClientBuilder
- type MoveReplicaInfo
- type MoveReplicaParams
- type QueryParams
- type Response
- type SLClient
- type SLClientV8
- func (sc *SLClientV8) AddRole(role, node string) (*Response, error)
- func (sc *SLClientV8) BackupCollection(ctx context.Context, collection string, backupName string, location string, ...) (*Response, error)
- func (sc *SLClientV8) BalanceReplica(async string) (*Response, error)
- func (sc *SLClientV8) CreateCollection() (*Response, error)
- func (sc *SLClientV8) DecodeBackupResponse(data map[string]interface{}, collection string) ([]byte, error)
- func (sc *SLClientV8) DeleteBackup(ctx context.Context, backupName string, collection string, location string, ...) (*Response, error)
- func (sc *SLClientV8) FlushStatus(asyncId string) (*Response, error)
- func (sc *SLClientV8) GetClient() *resty.Client
- func (sc *SLClientV8) GetClusterStatus() (*Response, error)
- func (sc *SLClientV8) GetConfig() *Config
- func (sc *SLClientV8) GetLog() logr.Logger
- func (sc *SLClientV8) ListCollection() (*Response, error)
- func (sc *SLClientV8) MoveReplica(target string, replica string, collection string, async string) (*Response, error)
- func (sc *SLClientV8) PurgeBackup(ctx context.Context, backupName string, collection string, location string, ...) (*Response, error)
- func (sc *SLClientV8) ReadCollection() (*Response, error)
- func (sc *SLClientV8) RemoveRole(role, node string) (*Response, error)
- func (sc *SLClientV8) RequestStatus(asyncId string) (*Response, error)
- func (sc *SLClientV8) RestoreCollection(ctx context.Context, collection string, backupName string, location string, ...) (*Response, error)
- func (sc *SLClientV8) WriteCollection() (*Response, error)
- type SLClientV9
- func (sc *SLClientV9) AddRole(role, node string) (*Response, error)
- func (sc *SLClientV9) BackupCollection(ctx context.Context, collection string, backupName string, location string, ...) (*Response, error)
- func (sc *SLClientV9) BalanceReplica(async string) (*Response, error)
- func (sc *SLClientV9) CreateCollection() (*Response, error)
- func (sc *SLClientV9) DecodeBackupResponse(data map[string]interface{}, collection string) ([]byte, error)
- func (sc *SLClientV9) DeleteBackup(ctx context.Context, backupName string, collection string, location string, ...) (*Response, error)
- func (sc *SLClientV9) FlushStatus(asyncId string) (*Response, error)
- func (sc *SLClientV9) GetClient() *resty.Client
- func (sc *SLClientV9) GetClusterStatus() (*Response, error)
- func (sc *SLClientV9) GetConfig() *Config
- func (sc *SLClientV9) GetLog() logr.Logger
- func (sc *SLClientV9) ListCollection() (*Response, error)
- func (sc *SLClientV9) MoveReplica(target string, replica string, collection string, async string) (*Response, error)
- func (sc *SLClientV9) PurgeBackup(ctx context.Context, backupName string, collection string, location string, ...) (*Response, error)
- func (sc *SLClientV9) ReadCollection() (*Response, error)
- func (sc *SLClientV9) RemoveRole(role, node string) (*Response, error)
- func (sc *SLClientV9) RequestStatus(asyncId string) (*Response, error)
- func (sc *SLClientV9) RestoreCollection(ctx context.Context, collection string, backupName string, location string, ...) (*Response, error)
- func (sc *SLClientV9) WriteCollection() (*Response, error)
- type UpdateList
Constants ¶
View Source
const ( Action = "action" ActionBackup = "BACKUP" ActionRestore = "RESTORE" ActionCreate = "CREATE" ActionDeleteBackup = "DELETEBACKUP" AddRole = "ADDROLE" RemoveRole = "REMOVEROLE" Name = "name" Role = "role" Node = "node" Location = "location" Repository = "repository" Collection = "collection" Async = "async" Replica = "replica" MoveReplica = "MOVEREPLICA" PurgeUnused = "purgeUnused" TargetNode = "targetNode" BackupId = "backupId" DeleteStatus = "DELETESTATUS" RequestStatus = "REQUESTSTATUS" RequestId = "requestid" NumShards = "numShards" ReplicationFactor = "replicationFactor" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BalanceReplica ¶ added in v0.3.0
type Client ¶
type Client struct {
SLClient
}
func (*Client) BalanceReplicaManual ¶ added in v0.3.0
func (*Client) CheckupStatus ¶ added in v0.3.0
func (*Client) CleanupAsync ¶ added in v0.3.0
func (*Client) DecodeCollectionHealth ¶
func (*Client) DecodeResponse ¶
func (*Client) FlushAsyncStatus ¶ added in v0.3.0
func (*Client) GetAsyncStatus ¶
func (*Client) GetCollectionList ¶
func (*Client) GetResponseStatus ¶
func (*Client) Run ¶ added in v0.3.0
func (sc *Client) Run(lst []UpdateList) error
func (*Client) SearchCollection ¶
type ClientOptions ¶
type CreateParams ¶
type CreateParams struct { Name string `json:"name,omitempty" yaml:"name,omitempty"` Config string `json:"config,omitempty" yaml:"config,omitempty"` NumShards int `json:"numShards,omitempty" yaml:"numShards,omitempty"` ReplicationFactor int `json:"replicationFactor,omitempty" yaml:"replicationFactor,omitempty"` }
type KubeDBClientBuilder ¶
type KubeDBClientBuilder struct {
// contains filtered or unexported fields
}
func NewKubeDBClientBuilder ¶
func NewKubeDBClientBuilder(kc client.Client, db *api.Solr) *KubeDBClientBuilder
func (*KubeDBClientBuilder) GetHostPath ¶
func (o *KubeDBClientBuilder) GetHostPath(db *api.Solr) string
func (*KubeDBClientBuilder) GetSolrClient ¶
func (o *KubeDBClientBuilder) GetSolrClient() (*Client, error)
func (*KubeDBClientBuilder) WithContext ¶
func (o *KubeDBClientBuilder) WithContext(ctx context.Context) *KubeDBClientBuilder
func (*KubeDBClientBuilder) WithLog ¶
func (o *KubeDBClientBuilder) WithLog(log logr.Logger) *KubeDBClientBuilder
func (*KubeDBClientBuilder) WithPod ¶
func (o *KubeDBClientBuilder) WithPod(podName string) *KubeDBClientBuilder
func (*KubeDBClientBuilder) WithURL ¶
func (o *KubeDBClientBuilder) WithURL(url string) *KubeDBClientBuilder
type MoveReplicaInfo ¶ added in v0.3.0
type MoveReplicaParams ¶ added in v0.3.0
type MoveReplicaParams struct {
MoveReplica MoveReplicaInfo `json:"move-replica,omitempty" yaml:"move-replica,omitempty"`
}
type QueryParams ¶
type SLClient ¶
type SLClient interface { GetClusterStatus() (*Response, error) ListCollection() (*Response, error) CreateCollection() (*Response, error) WriteCollection() (*Response, error) ReadCollection() (*Response, error) BackupCollection(ctx context.Context, collection string, backupName string, location string, repository string) (*Response, error) RestoreCollection(ctx context.Context, collection string, backupName string, location string, repository string, backupId int) (*Response, error) FlushStatus(asyncId string) (*Response, error) RequestStatus(asyncId string) (*Response, error) DeleteBackup(ctx context.Context, backupName string, collection string, location string, repository string, backupId int, snap string) (*Response, error) PurgeBackup(ctx context.Context, backupName string, collection string, location string, repository string, snap string) (*Response, error) GetConfig() *Config GetClient() *resty.Client GetLog() logr.Logger DecodeBackupResponse(data map[string]interface{}, collection string) ([]byte, error) MoveReplica(target string, replica string, collection string, async string) (*Response, error) BalanceReplica(async string) (*Response, error) AddRole(role, node string) (*Response, error) RemoveRole(role, node string) (*Response, error) }
type SLClientV8 ¶
type SLClientV8 struct { Client *resty.Client Config *Config }
func (*SLClientV8) AddRole ¶ added in v0.3.0
func (sc *SLClientV8) AddRole(role, node string) (*Response, error)
func (*SLClientV8) BackupCollection ¶
func (*SLClientV8) BalanceReplica ¶ added in v0.3.0
func (sc *SLClientV8) BalanceReplica(async string) (*Response, error)
func (*SLClientV8) CreateCollection ¶
func (sc *SLClientV8) CreateCollection() (*Response, error)
func (*SLClientV8) DecodeBackupResponse ¶
func (sc *SLClientV8) DecodeBackupResponse(data map[string]interface{}, collection string) ([]byte, error)
func (*SLClientV8) DeleteBackup ¶
func (*SLClientV8) FlushStatus ¶
func (sc *SLClientV8) FlushStatus(asyncId string) (*Response, error)
func (*SLClientV8) GetClient ¶
func (sc *SLClientV8) GetClient() *resty.Client
func (*SLClientV8) GetClusterStatus ¶
func (sc *SLClientV8) GetClusterStatus() (*Response, error)
func (*SLClientV8) GetConfig ¶
func (sc *SLClientV8) GetConfig() *Config
func (*SLClientV8) GetLog ¶
func (sc *SLClientV8) GetLog() logr.Logger
func (*SLClientV8) ListCollection ¶
func (sc *SLClientV8) ListCollection() (*Response, error)
func (*SLClientV8) MoveReplica ¶ added in v0.3.0
func (*SLClientV8) PurgeBackup ¶
func (*SLClientV8) ReadCollection ¶
func (sc *SLClientV8) ReadCollection() (*Response, error)
func (*SLClientV8) RemoveRole ¶ added in v0.3.0
func (sc *SLClientV8) RemoveRole(role, node string) (*Response, error)
func (*SLClientV8) RequestStatus ¶
func (sc *SLClientV8) RequestStatus(asyncId string) (*Response, error)
func (*SLClientV8) RestoreCollection ¶
func (*SLClientV8) WriteCollection ¶
func (sc *SLClientV8) WriteCollection() (*Response, error)
type SLClientV9 ¶
type SLClientV9 struct { Client *resty.Client Config *Config }
func (*SLClientV9) AddRole ¶ added in v0.3.0
func (sc *SLClientV9) AddRole(role, node string) (*Response, error)
func (*SLClientV9) BackupCollection ¶
func (*SLClientV9) BalanceReplica ¶ added in v0.3.0
func (sc *SLClientV9) BalanceReplica(async string) (*Response, error)
func (*SLClientV9) CreateCollection ¶
func (sc *SLClientV9) CreateCollection() (*Response, error)
func (*SLClientV9) DecodeBackupResponse ¶
func (sc *SLClientV9) DecodeBackupResponse(data map[string]interface{}, collection string) ([]byte, error)
func (*SLClientV9) DeleteBackup ¶
func (*SLClientV9) FlushStatus ¶
func (sc *SLClientV9) FlushStatus(asyncId string) (*Response, error)
func (*SLClientV9) GetClient ¶
func (sc *SLClientV9) GetClient() *resty.Client
func (*SLClientV9) GetClusterStatus ¶
func (sc *SLClientV9) GetClusterStatus() (*Response, error)
func (*SLClientV9) GetConfig ¶
func (sc *SLClientV9) GetConfig() *Config
func (*SLClientV9) GetLog ¶
func (sc *SLClientV9) GetLog() logr.Logger
func (*SLClientV9) ListCollection ¶
func (sc *SLClientV9) ListCollection() (*Response, error)
func (*SLClientV9) MoveReplica ¶ added in v0.3.0
func (*SLClientV9) PurgeBackup ¶
func (*SLClientV9) ReadCollection ¶
func (sc *SLClientV9) ReadCollection() (*Response, error)
func (*SLClientV9) RemoveRole ¶ added in v0.3.0
func (sc *SLClientV9) RemoveRole(role, node string) (*Response, error)
func (*SLClientV9) RequestStatus ¶
func (sc *SLClientV9) RequestStatus(asyncId string) (*Response, error)
func (*SLClientV9) RestoreCollection ¶
func (*SLClientV9) WriteCollection ¶
func (sc *SLClientV9) WriteCollection() (*Response, error)
type UpdateList ¶ added in v0.3.0
type UpdateList struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.