elasticsearch

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: Apache-2.0 Imports: 28 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	ESClient
}

type ESClient

type ESClient interface {
	ClusterHealthInfo() (map[string]interface{}, error)
	NodesStats() (map[string]interface{}, error)
	GetIndicesInfo() ([]interface{}, error)
	ClusterStatus() (string, error)
	SyncCredentialFromSecret(secret *core.Secret) error
	GetClusterWriteStatus(ctx context.Context, db *api.Elasticsearch) error
	GetClusterReadStatus(ctx context.Context, db *api.Elasticsearch) error
}

type ESClientV5

type ESClientV5 struct {
	// contains filtered or unexported fields
}

func (*ESClientV5) ClusterHealthInfo

func (es *ESClientV5) ClusterHealthInfo() (map[string]interface{}, error)

func (*ESClientV5) ClusterStatus

func (es *ESClientV5) ClusterStatus() (string, error)

func (*ESClientV5) GetClusterReadStatus

func (es *ESClientV5) GetClusterReadStatus(ctx context.Context, db *api.Elasticsearch) error

func (*ESClientV5) GetClusterWriteStatus

func (es *ESClientV5) GetClusterWriteStatus(ctx context.Context, db *api.Elasticsearch) error

func (*ESClientV5) GetIndicesInfo

func (es *ESClientV5) GetIndicesInfo() ([]interface{}, error)

GetIndicesInfo will return the indices info of an Elasticsearch database

func (*ESClientV5) NodesStats

func (es *ESClientV5) NodesStats() (map[string]interface{}, error)

func (*ESClientV5) SyncCredentialFromSecret

func (es *ESClientV5) SyncCredentialFromSecret(secret *core.Secret) error

kibana_system, logstash_system etc. internal users are not supported for versions 6.x.x and, kibana, logstash can be accessed using elastic superuser so, sysncing is not required for other builtin users

type ESClientV6

type ESClientV6 struct {
	// contains filtered or unexported fields
}

func (*ESClientV6) ClusterHealthInfo

func (es *ESClientV6) ClusterHealthInfo() (map[string]interface{}, error)

func (*ESClientV6) ClusterStatus

func (es *ESClientV6) ClusterStatus() (string, error)

func (*ESClientV6) GetClusterReadStatus

func (es *ESClientV6) GetClusterReadStatus(ctx context.Context, db *api.Elasticsearch) error

func (*ESClientV6) GetClusterWriteStatus

func (es *ESClientV6) GetClusterWriteStatus(ctx context.Context, db *api.Elasticsearch) error

func (*ESClientV6) GetIndicesInfo

func (es *ESClientV6) GetIndicesInfo() ([]interface{}, error)

GetIndicesInfo will return the indices info of an Elasticsearch database

func (*ESClientV6) NodesStats

func (es *ESClientV6) NodesStats() (map[string]interface{}, error)

func (*ESClientV6) SyncCredentialFromSecret

func (es *ESClientV6) SyncCredentialFromSecret(secret *core.Secret) error

kibana_system, logstash_system etc. internal users are not supported for versions 6.x.x and, kibana, logstash can be accessed using elastic superuser so, sysncing is not required for other builtin users

type ESClientV7

type ESClientV7 struct {
	// contains filtered or unexported fields
}

func (*ESClientV7) ClusterHealthInfo

func (es *ESClientV7) ClusterHealthInfo() (map[string]interface{}, error)

func (*ESClientV7) ClusterStatus

func (es *ESClientV7) ClusterStatus() (string, error)

func (*ESClientV7) GetClusterReadStatus

func (es *ESClientV7) GetClusterReadStatus(ctx context.Context, db *api.Elasticsearch) error

func (*ESClientV7) GetClusterWriteStatus

func (es *ESClientV7) GetClusterWriteStatus(ctx context.Context, db *api.Elasticsearch) error

func (*ESClientV7) GetIndicesInfo

func (es *ESClientV7) GetIndicesInfo() ([]interface{}, error)

GetIndicesInfo will return the indices info of an Elasticsearch database

func (*ESClientV7) NodesStats

func (es *ESClientV7) NodesStats() (map[string]interface{}, error)

func (*ESClientV7) SyncCredentialFromSecret

func (es *ESClientV7) SyncCredentialFromSecret(secret *core.Secret) error

type ESClientV8

type ESClientV8 struct {
	// contains filtered or unexported fields
}

func (*ESClientV8) ClusterHealthInfo

func (es *ESClientV8) ClusterHealthInfo() (map[string]interface{}, error)

func (*ESClientV8) ClusterStatus

func (es *ESClientV8) ClusterStatus() (string, error)

func (*ESClientV8) GetClusterReadStatus

func (es *ESClientV8) GetClusterReadStatus(ctx context.Context, db *api.Elasticsearch) error

func (*ESClientV8) GetClusterWriteStatus

func (es *ESClientV8) GetClusterWriteStatus(ctx context.Context, db *api.Elasticsearch) error

func (*ESClientV8) GetIndicesInfo

func (es *ESClientV8) GetIndicesInfo() ([]interface{}, error)

GetIndicesInfo will return the indices' info of an Elasticsearch database

func (*ESClientV8) NodesStats

func (es *ESClientV8) NodesStats() (map[string]interface{}, error)

func (*ESClientV8) SyncCredentialFromSecret

func (es *ESClientV8) SyncCredentialFromSecret(secret *core.Secret) error

type KubeDBClientBuilder

type KubeDBClientBuilder struct {
	// contains filtered or unexported fields
}

func NewKubeDBClientBuilder

func NewKubeDBClientBuilder(kc client.Client, db *api.Elasticsearch) *KubeDBClientBuilder

func (*KubeDBClientBuilder) GetElasticClient

func (o *KubeDBClientBuilder) GetElasticClient() (*Client, error)

func (*KubeDBClientBuilder) ServiceURL

func (o *KubeDBClientBuilder) ServiceURL() string

func (*KubeDBClientBuilder) WithContext

func (*KubeDBClientBuilder) WithPod

func (o *KubeDBClientBuilder) WithPod(podName string) *KubeDBClientBuilder

func (*KubeDBClientBuilder) WithURL

type OSClientV1

type OSClientV1 struct {
	// contains filtered or unexported fields
}

func (*OSClientV1) ClusterHealthInfo

func (os *OSClientV1) ClusterHealthInfo() (map[string]interface{}, error)

func (*OSClientV1) ClusterStatus

func (os *OSClientV1) ClusterStatus() (string, error)

func (*OSClientV1) GetClusterReadStatus

func (os *OSClientV1) GetClusterReadStatus(ctx context.Context, db *api.Elasticsearch) error

func (*OSClientV1) GetClusterWriteStatus

func (os *OSClientV1) GetClusterWriteStatus(ctx context.Context, db *api.Elasticsearch) error

func (*OSClientV1) GetIndicesInfo

func (os *OSClientV1) GetIndicesInfo() ([]interface{}, error)

GetIndicesInfo will return the indices' info of an Elasticsearch database

func (*OSClientV1) NodesStats

func (os *OSClientV1) NodesStats() (map[string]interface{}, error)

func (*OSClientV1) SyncCredentialFromSecret

func (os *OSClientV1) SyncCredentialFromSecret(secret *core.Secret) error

type WriteRequestIndex added in v0.0.3

type WriteRequestIndex struct {
	Index WriteRequestIndexBody `json:"index"`
}

type WriteRequestIndexBody added in v0.0.3

type WriteRequestIndexBody struct {
	ID   string `json:"_id"`
	Type string `json:"_type,omitempty"`
}

Jump to

Keyboard shortcuts

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