Documentation ¶
Index ¶
- type Client
- func (c *Client) CreateUpdateIndex(object *xov1alpha1.ElasticSearchIndex) (string, error)
- func (c *Client) CreateUpdateTemplate(modified *xov1alpha1.ElasticSearchTemplate) (string, error)
- func (c *Client) DeleteIndex(name string) error
- func (c *Client) DeleteTemplate(name string) error
- func (c *Client) IndexExists(name string) (bool, error)
- func (c *Client) TemplateExists(name string) (bool, error)
- type ES
- type ESAlias
- type Index
- type Option
- type Settings
- type Template
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is structure of ES client for XO
func (*Client) CreateUpdateIndex ¶
func (c *Client) CreateUpdateIndex(object *xov1alpha1.ElasticSearchIndex) (string, error)
CreateUpdateIndex would update index if it exists or create if not
func (*Client) CreateUpdateTemplate ¶
func (c *Client) CreateUpdateTemplate(modified *xov1alpha1.ElasticSearchTemplate) (string, error)
CreateUpdateTemplate is going to update ES template with template user provides or create a new one nolint
func (*Client) DeleteIndex ¶
DeleteIndex would delete ES index
func (*Client) DeleteTemplate ¶
DeleteTemplate would delete ES template
func (*Client) IndexExists ¶
IndexExists would check if index exists
type ES ¶
type ES interface { // Index IndexExists(name string) (bool, error) CreateUpdateIndex(index *xov1alpha1.ElasticSearchIndex) (string, error) DeleteIndex(indexName string) error // Template TemplateExists(name string) (bool, error) CreateUpdateTemplate(tmpl *xov1alpha1.ElasticSearchTemplate) (string, error) DeleteTemplate(tmplName string) error }
ES is interface for ElasticSearch
type ESAlias ¶
type ESAlias struct { Indices []string `json:"indices,omitempty"` Aliases []string `json:"aliases,omitempty"` Filter interface{} `json:"filter,omitempty"` IsWriteIndex bool `json:"is_write_index,omitempty"` Routing string `json:"routing,omitempty"` IndexRouting string `json:"index_routing,omitempty"` SearchRouting string `json:"search_routing,omitempty"` }
ESAlias has struct same as xov1alpha1.ESAlias, but replaces Filter with interface
type Index ¶
type Index struct { Settings Settings `json:"settings"` Mappings map[string]interface{} `json:"mappings"` }
Index is configuration struct for ES index creation
type Option ¶
Option is a type of options for Executor
type Settings ¶
type Settings struct {
Index xov1alpha1.ESIndexSettings `json:"index"`
}
Settings is required to create ES Index
type Template ¶
type Template struct { IndexPatterns []string `json:"index_patterns"` Aliases map[string]ESAlias `json:"aliases,omitempty"` Mappings interface{} `json:"mappings"` Settings Settings `json:"settings,omitempty"` Version int64 `json:"version,omitempty"` }
Template is configuration struct for ES Template creation