Documentation ¶
Overview ¶
eslite: Package for a simple elasticsearch writer, support es1~es6
Index ¶
- Variables
- type ESLite
- type ElasticClientV1
- func (es *ElasticClientV1) Begin() error
- func (es *ElasticClientV1) Close()
- func (es *ElasticClientV1) Commit() error
- func (es *ElasticClientV1) Open(host string, port int, userName, pass string) error
- func (es *ElasticClientV1) SetPipeline(pipeline string) error
- func (es *ElasticClientV1) Write(index string, id string, typ string, v interface{}) error
- func (es *ElasticClientV1) WriteDirect(index string, id string, typ string, v interface{}) error
- type ElasticClientV2
- func (es *ElasticClientV2) Begin() error
- func (es *ElasticClientV2) Close()
- func (es *ElasticClientV2) Commit() error
- func (es *ElasticClientV2) Open(host string, port int, userName, pass string) error
- func (es *ElasticClientV2) SetPipeline(pipeline string) error
- func (es *ElasticClientV2) Write(index string, id string, typ string, v interface{}) error
- func (es *ElasticClientV2) WriteDirect(index string, id string, typ string, v interface{}) error
- type ElasticClientV3
- func (es *ElasticClientV3) Begin() error
- func (es *ElasticClientV3) Close()
- func (es *ElasticClientV3) Commit(pipeline string) error
- func (es *ElasticClientV3) Open(host string, port int, userName, pass string) error
- func (es *ElasticClientV3) SetPipeline(pipeline string) error
- func (es *ElasticClientV3) Write(index string, id string, typ string, v interface{}) error
- func (es *ElasticClientV3) WriteDirect(index string, id string, typ string, v interface{}) error
- type ElasticClientV5
- func (es *ElasticClientV5) Begin() error
- func (es *ElasticClientV5) Close()
- func (es *ElasticClientV5) Commit() error
- func (es *ElasticClientV5) Open(host string, port int, usrName, pass string) error
- func (es *ElasticClientV5) SetPipeline(pipeline string) error
- func (es *ElasticClientV5) Write(index string, id string, typ string, v interface{}) error
- func (es *ElasticClientV5) WriteDirect(index string, id string, typ string, v interface{}) error
- type ElasticClientV6
- func (es *ElasticClientV6) Begin() error
- func (es *ElasticClientV6) Close()
- func (es *ElasticClientV6) Commit() error
- func (es *ElasticClientV6) Open(host string, port int, usrName, pass string) error
- func (es *ElasticClientV6) SetPipeline(pipeline string) error
- func (es *ElasticClientV6) Write(index string, id string, typ string, v interface{}) error
- func (es *ElasticClientV6) WriteDirect(index, id, typ string, v interface{}) error
- type ElasticClientV7
- func (es *ElasticClientV7) Begin() error
- func (es *ElasticClientV7) Close()
- func (es *ElasticClientV7) Commit() error
- func (es *ElasticClientV7) Open(host string, port int, usrName, pass string) error
- func (es *ElasticClientV7) SetPipeline(pipeline string) error
- func (es *ElasticClientV7) Write(index string, id string, typ string, v interface{}) error
- func (es *ElasticClientV7) WriteDirect(index, id, typ string, v interface{}) error
- type ElasticGoClient
- func (es *ElasticGoClient) Begin() error
- func (es *ElasticGoClient) Close()
- func (es *ElasticGoClient) Commit() error
- func (es *ElasticGoClient) Open(host string, port int, userName, pass string) error
- func (es *ElasticGoClient) SetPipeline(pipeline string) error
- func (es *ElasticGoClient) Write(index string, id string, typ string, v interface{}) error
- func (es *ElasticGoClient) WriteDirect(index string, id string, typ string, v interface{}) error
Constants ¶
This section is empty.
Variables ¶
var (
ErrNotSupportPipeline = errors.New("Only elasticv5,v6 support pipeline")
)
elasticsearch add pipeline feature after version 5.0
Functions ¶
This section is empty.
Types ¶
type ESLite ¶
type ESLite interface { Open(host string, port int, userName, pass string) error Close() Begin() error SetPipeline(pipeline string) error Write(index string, id string, typ string, v interface{}) error WriteDirect(index string, id string, typ string, v interface{}) error Commit() error }
elasticsearch writer interface
type ElasticClientV1 ¶
type ElasticClientV1 struct {
// contains filtered or unexported fields
}
func (*ElasticClientV1) Open ¶
func (es *ElasticClientV1) Open(host string, port int, userName, pass string) error
open: connect with elasticsearch by user:pass@host:port
func (*ElasticClientV1) SetPipeline ¶
func (es *ElasticClientV1) SetPipeline(pipeline string) error
set elasticsearch pipeline, expect es version>5.0
func (*ElasticClientV1) Write ¶
func (es *ElasticClientV1) Write(index string, id string, typ string, v interface{}) error
patch write elastic document
func (*ElasticClientV1) WriteDirect ¶
func (es *ElasticClientV1) WriteDirect(index string, id string, typ string, v interface{}) error
write a document directly
type ElasticClientV2 ¶
type ElasticClientV2 struct {
// contains filtered or unexported fields
}
func (*ElasticClientV2) Open ¶
func (es *ElasticClientV2) Open(host string, port int, userName, pass string) error
open: connect with elasticsearch by user:pass@host:port
func (*ElasticClientV2) SetPipeline ¶
func (es *ElasticClientV2) SetPipeline(pipeline string) error
set elasticsearch pipeline
func (*ElasticClientV2) Write ¶
func (es *ElasticClientV2) Write(index string, id string, typ string, v interface{}) error
patch write elastic document
func (*ElasticClientV2) WriteDirect ¶
func (es *ElasticClientV2) WriteDirect(index string, id string, typ string, v interface{}) error
write a document directly
type ElasticClientV3 ¶
type ElasticClientV3 struct {
// contains filtered or unexported fields
}
ElasticClientV3 object
func (*ElasticClientV3) Commit ¶
func (es *ElasticClientV3) Commit(pipeline string) error
commit patch write
func (*ElasticClientV3) Open ¶
func (es *ElasticClientV3) Open(host string, port int, userName, pass string) error
open: connect with elasticsearch by user:pass@host:port
func (*ElasticClientV3) SetPipeline ¶
func (es *ElasticClientV3) SetPipeline(pipeline string) error
set elasticsearch pipeline, expect es version>5.0
func (*ElasticClientV3) Write ¶
func (es *ElasticClientV3) Write(index string, id string, typ string, v interface{}) error
patch write elastic document
func (*ElasticClientV3) WriteDirect ¶
func (es *ElasticClientV3) WriteDirect(index string, id string, typ string, v interface{}) error
write a document directly
type ElasticClientV5 ¶
type ElasticClientV5 struct {
// contains filtered or unexported fields
}
func (*ElasticClientV5) Open ¶
func (es *ElasticClientV5) Open(host string, port int, usrName, pass string) error
open: connect with elasticsearch by user:pass@host:port
func (*ElasticClientV5) SetPipeline ¶
func (es *ElasticClientV5) SetPipeline(pipeline string) error
set elasticsearch pipeline
func (*ElasticClientV5) Write ¶
func (es *ElasticClientV5) Write(index string, id string, typ string, v interface{}) error
patch write elastic document
func (*ElasticClientV5) WriteDirect ¶
func (es *ElasticClientV5) WriteDirect(index string, id string, typ string, v interface{}) error
write a document directly
type ElasticClientV6 ¶
type ElasticClientV6 struct {
// contains filtered or unexported fields
}
ElasticClientV6 object
func (*ElasticClientV6) Open ¶
func (es *ElasticClientV6) Open(host string, port int, usrName, pass string) error
open: connect with elasticsearch by user:pass@host:port
func (*ElasticClientV6) SetPipeline ¶
func (es *ElasticClientV6) SetPipeline(pipeline string) error
set elasticsearch pipeline
func (*ElasticClientV6) Write ¶
func (es *ElasticClientV6) Write(index string, id string, typ string, v interface{}) error
patch write elastic document
func (*ElasticClientV6) WriteDirect ¶
func (es *ElasticClientV6) WriteDirect(index, id, typ string, v interface{}) error
write a document directly
type ElasticClientV7 ¶
type ElasticClientV7 struct {
// contains filtered or unexported fields
}
ElasticClientV7 object
func (*ElasticClientV7) Open ¶
func (es *ElasticClientV7) Open(host string, port int, usrName, pass string) error
open: connect with elasticsearch by user:pass@host:port
func (*ElasticClientV7) SetPipeline ¶
func (es *ElasticClientV7) SetPipeline(pipeline string) error
set elasticsearch pipeline
func (*ElasticClientV7) Write ¶
func (es *ElasticClientV7) Write(index string, id string, typ string, v interface{}) error
patch write elastic document
func (*ElasticClientV7) WriteDirect ¶
func (es *ElasticClientV7) WriteDirect(index, id, typ string, v interface{}) error
write a document directly
type ElasticGoClient ¶
type ElasticGoClient struct {
// contains filtered or unexported fields
}
func (*ElasticGoClient) Open ¶
func (es *ElasticGoClient) Open(host string, port int, userName, pass string) error
open: connect with elasticsearch by user:pass@host:port
func (*ElasticGoClient) SetPipeline ¶
func (es *ElasticGoClient) SetPipeline(pipeline string) error
set elasticsearch pipeline, expect elasticsearch version>=5.0
func (*ElasticGoClient) Write ¶
func (es *ElasticGoClient) Write(index string, id string, typ string, v interface{}) error
patch write elastic document
func (*ElasticGoClient) WriteDirect ¶
func (es *ElasticGoClient) WriteDirect(index string, id string, typ string, v interface{}) error
write a document directly