Documentation ¶
Index ¶
- func C() *elasticsearch.TypedClient
- func CheckVersion() error
- func ConvertFactToSearchRequestV8(f engine.Fact, ti time.Time, parameters map[string]string) (*search.Request, error)
- func NewPutTemplateRequestV8(indexPatterns []string, model modeler.Model) *puttemplate.Request
- func ReplaceGlobals(config elasticsearch.Config) error
- type BulkIndexMeta
- type BulkIndexMetaDetail
- type BulkIndexResponse
- type BulkIndexResponseItem
- type Credentials
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckVersion ¶
func CheckVersion() error
func NewPutTemplateRequestV8 ¶
func NewPutTemplateRequestV8(indexPatterns []string, model modeler.Model) *puttemplate.Request
NewPutTemplateRequestV8 constructor the ES template
func ReplaceGlobals ¶
func ReplaceGlobals(config elasticsearch.Config) error
ReplaceGlobals affect new elasticsearch credentials and connection to the global repository singleton
Types ¶
type BulkIndexMeta ¶
type BulkIndexMeta struct {
Index BulkIndexMetaDetail `json:"index"`
}
type BulkIndexMetaDetail ¶
type BulkIndexResponse ¶
type BulkIndexResponse struct { Took int `json:"took,omitempty"` Errors bool `json:"errors,omitempty"` Items []map[string]*BulkIndexResponseItem `json:"items,omitempty"` }
func (*BulkIndexResponse) Failed ¶
func (r *BulkIndexResponse) Failed() []*BulkIndexResponseItem
Failed returns those items of a bulkIndex response that have errors, i.e. those that don't have a status code between 200 and 299.
type BulkIndexResponseItem ¶
type BulkIndexResponseItem struct { Index string `json:"_index"` DocumentID string `json:"_id"` Version int64 `json:"_version"` Result string `json:"result"` Status int `json:"status"` SeqNo int64 `json:"_seq_no"` PrimTerm int64 `json:"_primary_term"` Shards struct { Total int `json:"total"` Successful int `json:"successful"` Failed int `json:"failed"` } `json:"_shards"` Error struct { Type string `json:"type"` Reason string `json:"reason"` Cause struct { Type string `json:"type"` Reason string `json:"reason"` } `json:"caused_by"` } `json:"error,omitempty"` }
BulkIndexResponseItem represents the Elasticsearch response item.
type Credentials ¶
type Credentials struct {
URLs []string
}
Credentials is used to store the elasticsearch credentials
Click to show internal directories.
Click to hide internal directories.