 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Variables
- func FormatFilter(filter *filters.Filter, mapKey string) elastic.Query
- func SetRollingRate(rate time.Duration)
- type Client
- func (c *Client) BulkDelete(index Index, id string) error
- func (c *Client) BulkIndex(index Index, id string, data interface{}) error
- func (c *Client) Delete(index Index, id string) (*elastic.DeleteResponse, error)
- func (c *Client) Get(index Index, id string) (*elastic.GetResult, error)
- func (c *Client) GetClient() *elastic.Client
- func (c *Client) Index(index Index, id string, data interface{}) error
- func (c *Client) RollIndex()
- func (c *Client) Search(typ string, query elastic.Query, opts filters.SearchQuery, indices ...string) (*elastic.SearchResult, error)
- func (c *Client) Start()
- func (c *Client) Started() bool
- func (c *Client) Stop()
 
- type ClientInterface
- type Config
- type Index
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  
    
  
var ( // ErrBadConfig error bad configuration file ErrBadConfig = func(reason string) error { return fmt.Errorf("Config file is misconfigured: %s", reason) } // ErrIndexTypeNotFound error index type used but not defined ErrIndexTypeNotFound = errors.New("Index type not found in the indices map") )
Functions ¶
func FormatFilter ¶ added in v0.19.1
FormatFilter creates a ElasticSearch request based on filters
Types ¶
type Client ¶ added in v0.19.1
type Client struct {
	// contains filtered or unexported fields
}
    Client describes a ElasticSearch client connection
func NewClient ¶ added in v0.19.1
NewClient creates a new ElasticSearch client based on configuration
func (*Client) BulkDelete ¶ added in v0.19.1
BulkDelete an object with the indexer
func (*Client) BulkIndex ¶ added in v0.19.1
BulkIndex returns the bulk index from the indexer
func (*Client) Delete ¶ added in v0.19.1
Delete an object
func (*Client) Get ¶ added in v0.19.1
Get an object
func (*Client) GetClient ¶ added in v0.19.1
GetClient returns the elastic client object
func (*Client) Index ¶ added in v0.19.1
Index returns the skydive index
func (*Client) RollIndex ¶ added in v0.19.1
func (c *Client) RollIndex()
RollIndex forces a rolling index
func (*Client) Search ¶ added in v0.19.1
func (c *Client) Search(typ string, query elastic.Query, opts filters.SearchQuery, indices ...string) (*elastic.SearchResult, error)
Search an object
func (*Client) Start ¶ added in v0.19.1
func (c *Client) Start()
Start the Elasticsearch client background jobs
func (*Client) Started ¶ added in v0.19.1
Started is the client already started ?
type ClientInterface ¶ added in v0.19.1
type ClientInterface interface {
	Index(index Index, id string, data interface{}) error
	BulkIndex(index Index, id string, data interface{}) error
	Get(index Index, id string) (*elastic.GetResult, error)
	Delete(index Index, id string) (*elastic.DeleteResponse, error)
	BulkDelete(index Index, id string) error
	Search(typ string, query elastic.Query, pagination filters.SearchQuery, indices ...string) (*elastic.SearchResult, error)
	Start()
}
    ClientInterface describes the mechanism API of ElasticSearch database client
type Config ¶ added in v0.18.0
type Config struct {
	ElasticHost  string
	BulkMaxDelay int
	EntriesLimit int
	AgeLimit     int
	IndicesLimit int
}
    Config describes configuration for elasticsearch
       Source Files
      ¶
      Source Files
      ¶
    
- client.go
- rollindex.go
 Click to show internal directories. 
   Click to hide internal directories.