Documentation ¶
Index ¶
- Constants
- type BulkIndexerResponse
- type BulkIndexerResponseItem
- type Client
- type ClientSet
- type Config
- type RenderIndexFail
- type Sink
- func (s *Sink) Category() api.Category
- func (s *Sink) Config() interface{}
- func (s *Sink) Consume(batch api.Batch) api.Result
- func (s *Sink) Init(context api.Context) error
- func (s *Sink) SetCodec(c codec.Codec)
- func (s *Sink) Start() error
- func (s *Sink) Stop()
- func (s *Sink) String() string
- func (s *Sink) Type() api.Type
Constants ¶
View Source
const Type = "elasticsearch"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BulkIndexerResponse ¶ added in v1.5.0
type BulkIndexerResponse struct { Took int `json:"took"` HasErrors bool `json:"errors"` Items []map[string]*BulkIndexerResponseItem `json:"items,omitempty"` }
BulkIndexerResponse represents the Elasticsearch response.
func (*BulkIndexerResponse) Failed ¶ added in v1.5.0
func (r *BulkIndexerResponse) Failed() []*BulkIndexerResponseItem
type BulkIndexerResponseItem ¶ added in v1.5.0
type BulkIndexerResponseItem 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"` }
BulkIndexerResponseItem represents the Elasticsearch response item.
type ClientSet ¶
type ClientSet struct {
// contains filtered or unexported fields
}
type Config ¶
type Config struct { Hosts []string `yaml:"hosts,omitempty" validate:"required"` UserName string `yaml:"username,omitempty"` Password string `yaml:"password,omitempty"` Index string `yaml:"index,omitempty"` Headers map[string]string `yaml:"headers,omitempty"` Params map[string]string `yaml:"parameters,omitempty"` IfRenderIndexFailed RenderIndexFail `yaml:"ifRenderIndexFailed,omitempty"` Etype string `yaml:"etype,omitempty"` // elasticsearch type, for v5.* backward compatibility DocumentId string `yaml:"documentId,omitempty"` APIKey string `yaml:"apiKey,omitempty"` ServiceToken string `yaml:"serviceToken,omitempty"` CACertPath string `yaml:"caCertPath,omitempty"` Compress bool `yaml:"compress,omitempty"` Gzip *bool `yaml:"gzip,omitempty"` // deprecated, use compress above OpType string `yaml:"opType,omitempty" default:"index"` DiscoverNodesOnStart bool `yaml:"discoverNodesOnStart,omitempty"` DiscoverNodesInterval time.Duration `yaml:"discoverNodesInterval,omitempty"` }
type RenderIndexFail ¶ added in v1.5.0
Click to show internal directories.
Click to hide internal directories.