elasticsearch

package
v0.0.0-...-41dce0b Latest Latest
Warning

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

Go to latest
Published: May 1, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Save

func Save(client *elastic.Client, index string, item event.Event) (err error)
func Search(client *elastic.Client, index, InvolvedNamespace, InvolvedKind, InvolvedName string, limit int) (items []event.Event, err error)

Search 根据条件查询ES中的event,此处用于查询pod事件,通常参数为namespace,podname,limit

Types

type ElasticClt

type ElasticClt struct {
	Client *elastic.Client
	Conf   config.ElasticsearchConf
}

func (*ElasticClt) GetEvents

func (e *ElasticClt) GetEvents(namespace, kind, kindName string)

func (*ElasticClt) Init

func (e *ElasticClt) Init(c config.Config) (err error)

func (*ElasticClt) ObjectCreated

func (e *ElasticClt) ObjectCreated(obj event.Event)

func (*ElasticClt) ObjectDeleted

func (e *ElasticClt) ObjectDeleted(obj event.Event)

func (*ElasticClt) ObjectUpdated

func (e *ElasticClt) ObjectUpdated(obj event.Event)

Jump to

Keyboard shortcuts

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