Documentation ¶
Index ¶
- func BasicAuth(username, password string) string
- type Alias
- type Client
- type ClusterAPI
- type ClusterClient
- type ILMClient
- type Index
- type IndexAPI
- type IndexManagementLifecycleAPI
- type IndicesClient
- func (i *IndicesClient) CreateAlias(aliases []Alias) error
- func (i *IndicesClient) CreateIndex(index string) error
- func (i IndicesClient) CreateTemplate(template, name string) error
- func (i *IndicesClient) DeleteAlias(aliases []Alias) error
- func (i *IndicesClient) DeleteIndices(indices []Index) error
- func (i *IndicesClient) GetJaegerIndices(prefix string) ([]Index, error)
- func (i IndicesClient) Rollover(rolloverTarget string, conditions map[string]any) error
- type ResponseError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Alias ¶
type Alias struct { // Index name. Index string // Alias name. Name string // IsWritedIndex option IsWriteIndex bool }
Alias represents ES alias.
type Client ¶
type Client struct { // Http client. Client *http.Client // ES server endpoint. Endpoint string // Basic authentication string. BasicAuth string }
Client executes requests against Elasticsearch using direct HTTP calls, without using the official Go client for ES.
type ClusterAPI ¶
type ClusterClient ¶
type ClusterClient struct {
Client
}
ClusterClient is a client used to get ES cluster information
func (*ClusterClient) Version ¶
func (c *ClusterClient) Version() (uint, error)
Version returns the major version of the ES cluster
type Index ¶
type Index struct { // Index name. Index string // Index creation time. CreationTime time.Time // Aliases Aliases map[string]bool }
Index represents ES index.
type IndexAPI ¶
type IndexAPI interface { GetJaegerIndices(prefix string) ([]Index, error) DeleteIndices(indices []Index) error CreateIndex(index string) error CreateAlias(aliases []Alias) error DeleteAlias(aliases []Alias) error CreateTemplate(template, name string) error Rollover(rolloverTarget string, conditions map[string]any) error }
type IndicesClient ¶
IndicesClient is a client used to manipulate indices.
func (*IndicesClient) CreateAlias ¶
func (i *IndicesClient) CreateAlias(aliases []Alias) error
CreateAlias an ES specific set of index aliases
func (*IndicesClient) CreateIndex ¶
func (i *IndicesClient) CreateIndex(index string) error
CreateIndex an ES index
func (IndicesClient) CreateTemplate ¶
func (i IndicesClient) CreateTemplate(template, name string) error
CreateTemplate an ES index template
func (*IndicesClient) DeleteAlias ¶
func (i *IndicesClient) DeleteAlias(aliases []Alias) error
DeleteAlias an ES specific set of index aliases
func (*IndicesClient) DeleteIndices ¶
func (i *IndicesClient) DeleteIndices(indices []Index) error
DeleteIndices deletes specified set of indices.
func (*IndicesClient) GetJaegerIndices ¶
func (i *IndicesClient) GetJaegerIndices(prefix string) ([]Index, error)
GetJaegerIndices queries all Jaeger indices including the archive and rollover. Jaeger daily indices are: - jaeger-span-2019-01-01 - jaeger-service-2019-01-01 - jaeger-dependencies-2019-01-01 - jaeger-span-archive
Rollover indices: - aliases: jaeger-span-read, jaeger-span-write, jaeger-service-read, jaeger-service-write - indices: jaeger-span-000001, jaeger-service-000001 etc. - aliases: jaeger-span-archive-read, jaeger-span-archive-write - indices: jaeger-span-archive-000001
type ResponseError ¶
type ResponseError struct { // Error returned by the http client Err error // StatusCode is the http code returned by the server (if any) StatusCode int // Body is the bytes readed in the response (if any) Body []byte }
ResponseError holds information about a request error
func (ResponseError) Error ¶
func (r ResponseError) Error() string
Error returns the error string of the Err field