elasticsearch

package
v0.0.0-...-dc3a80b Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InfraIndexPrefix   = "infra-"
	ProjectIndexPrefix = "app-"
	AuditIndexPrefix   = "audit-"
)
View Source
const (
	ManagedLogStore       = "elasticsearch-rh"
	ManagedLogStoreSecret = "elasticsearch"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ElasticLogStore

type ElasticLogStore struct {
	framework.Test
}

func NewElasticLogStore

func NewElasticLogStore(test framework.Test) *ElasticLogStore

func (*ElasticLogStore) ApplicationLogs

func (es *ElasticLogStore) ApplicationLogs(timeToWait time.Duration) (types.Logs, error)

func (*ElasticLogStore) ClusterLocalEndpoint

func (es *ElasticLogStore) ClusterLocalEndpoint() string

func (*ElasticLogStore) GrepLogs

func (es *ElasticLogStore) GrepLogs(expr string, timeToWait time.Duration) (string, error)

func (*ElasticLogStore) HasApplicationLogs

func (es *ElasticLogStore) HasApplicationLogs(timeToWait time.Duration) (bool, error)

func (*ElasticLogStore) HasAuditLogs

func (es *ElasticLogStore) HasAuditLogs(timeToWait time.Duration) (bool, error)

func (*ElasticLogStore) HasInfraStructureLogs

func (es *ElasticLogStore) HasInfraStructureLogs(timeToWait time.Duration) (bool, error)

func (*ElasticLogStore) Indices

func (es *ElasticLogStore) Indices() (Indices, error)

Indices fetches the list of indices stored by Elasticsearch

func (*ElasticLogStore) RetrieveLogs

func (es *ElasticLogStore) RetrieveLogs() (map[string]string, error)

type Index

type Index struct {
	Health           string `json:"health"`
	Status           string `json:"status"`
	Name             string `json:"index"`
	UUID             string `json:"uuid"`
	Primary          string `json:"pri"`
	Replicas         string `json:"rep"`
	DocsCount        string `json:"docs.count"`
	DocsDeleted      string `json:"docs.deleted"`
	StoreSize        string `json:"store.size"`
	PrimaryStoreSize string `json:"pri.store.size"`
}

func (*Index) DocCount

func (index *Index) DocCount() int

type Indices

type Indices []Index

func (*Indices) HasApplicationLogs

func (indices *Indices) HasApplicationLogs() bool

HasApplicationLogs returns true if there are any indices that begin with ProjectIndexPrefix and also contains documents

func (*Indices) HasAuditLogs

func (indices *Indices) HasAuditLogs() bool

HasAuditLogs returns true if there are any indices that begin with AuditIndexPrefix and also contains documents

func (*Indices) HasInfraStructureLogs

func (indices *Indices) HasInfraStructureLogs() bool

HasInfraStructureLogs returns true if there are any indices that begin with InfraIndexPrefix and also contains documents

type ManagedElasticsearch

type ManagedElasticsearch struct {
	*ElasticLogStore
}

func NewManagedElasticsearch

func NewManagedElasticsearch(test framework.Test) *ManagedElasticsearch

func (*ManagedElasticsearch) Deploy

func (es *ManagedElasticsearch) Deploy() error

TODO: Update to also support deployment of elasticsearch operator

Jump to

Keyboard shortcuts

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