25 lines
395 B
Go
25 lines
395 B
Go
package elastic
|
|
|
|
import (
|
|
"elasticstream/config"
|
|
"elasticstream/opencdc"
|
|
|
|
"github.com/boltdb/bolt"
|
|
"github.com/elastic/go-elasticsearch/v8"
|
|
)
|
|
|
|
type Client struct {
|
|
cfg *config.Config
|
|
es *elasticsearch.Client
|
|
db *bolt.DB
|
|
offsets map[string]int
|
|
ch chan opencdc.Data
|
|
}
|
|
|
|
func NewClient() *Client {
|
|
client := &Client{
|
|
offsets: make(map[string]int),
|
|
}
|
|
return client
|
|
}
|