Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrBulkCommitFail = errors.New("commit bulk returned errors")
)
View Source
var (
ErrEmptyDocumentStream = errors.New("document stream can not be empty")
)
Functions ¶
This section is empty.
Types ¶
type BulkElastic ¶
type BulkElastic struct {
// contains filtered or unexported fields
}
func NewElastic ¶
func NewElastic(opts BulkElasticOpts) (es *BulkElastic, err error)
func (*BulkElastic) PrepareScripts ¶
func (e *BulkElastic) PrepareScripts() error
type BulkElasticOpts ¶
type BulkElasticOpts struct { Host string Username string Password string // Logger *zap.Logger // Maximum waiting time for data. Any partial bulk request will be pushed after idleInterval. // Default: 5s IdleInterval time.Duration // Minimal time between requests. // Default: 500ms Throttle time.Duration // Time after request, if Debounce time.Duration // Maximum bulk request // Good one would be 4-8mb; limit ~100MBsize in megabytes // Default: 4M BulkSize int // document stream Stream *postgres.StreamPipe }
type BulkResponseErrors ¶ added in v0.2.0
type BulkResponseErrors struct {
Errors []BulkRowError
}
func (*BulkResponseErrors) UnmarshalJSON ¶ added in v0.2.0
func (bs *BulkResponseErrors) UnmarshalJSON(b []byte) error
type BulkRowError ¶ added in v0.2.0
func (BulkRowError) Error ¶ added in v0.2.0
func (err BulkRowError) Error() string
type Client ¶
func (*Client) Bulk ¶
Bulk request with basic error handling XXX: When using the HTTP API, make sure that the client does not send HTTP chunks, as this will slow things down. See: https://www.elastic.co/guide/en/elasticsearch/reference/7.10/docs-bulk.html
type Credentials ¶
type Credentials struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.