Documentation ¶
Index ¶
- func CreateIndex(conn *ConnInfo, name, mappingContent string) error
- func DefaultContext() context.Context
- func DeleteIndex(conn *ConnInfo, name string) error
- func DoMaxAggreation(conn *ConnInfo, index, filed, timeFiled string, begin, end int64) []interface{}
- func FetchRawWithConn(conn *ConnInfo, index, docType, docID string) (*json.RawMessage, bool)
- func FetchWithConn(conn *ConnInfo, index, docType, docID string, entity interface{}) bool
- func MakeESTimeStamp(timeObj time.Time) int64
- func Push(index, docType, docID string) error
- func PushBulk(conn *ConnInfo, index, docType string, docIDs []string, docs []interface{}) error
- func PushBulkPro(conn *ConnInfo, index, doc string, input []interface{}, ...) (successCount int, err error)
- func SetBulkCount(count int)
- type BuildStoreHandler
- type ConnInfo
- type DataTupleHandler
- type ValueObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateIndex ¶
CreateIndex used to create index in es
func DefaultContext ¶
DefaultContext used to return default es context
func DeleteIndex ¶
DeleteIndex used to delete index in es
func DoMaxAggreation ¶
func DoMaxAggreation(conn *ConnInfo, index, filed, timeFiled string, begin, end int64) []interface{}
DoMaxAggreation used to max aggreation
func FetchRawWithConn ¶
func FetchRawWithConn(conn *ConnInfo, index, docType, docID string) (*json.RawMessage, bool)
FetchRawWithConn used to get doc
func FetchWithConn ¶
FetchWithConn used to get doc
func MakeESTimeStamp ¶
MakeESTimeStamp used to make es timestamp
func PushBulkPro ¶
func PushBulkPro(conn *ConnInfo, index, doc string, input []interface{}, converter BuildStoreHandler) (successCount int, err error)
PushBulkPro used to push data by PushBulk
Types ¶
type BuildStoreHandler ¶
type BuildStoreHandler func(i interface{}) ([]string, []interface{})
BuildStoreHandler used express the function type for build store item
type ConnInfo ¶
type ConnInfo struct {
// contains filtered or unexported fields
}
ConnInfo used to cache es client
func NewConnInfo ¶
NewConnInfo used create ConnInfo
type DataTupleHandler ¶
DataTupleHandler used process the raw data to target object
Click to show internal directories.
Click to hide internal directories.