elasticstream/source/elastic/client.go

25 lines
362 B
Go

package elastic
import (
"fmt"
"log"
"github.com/boltdb/bolt"
"github.com/elastic/go-elasticsearch/v8"
)
type Client struct {
cfg *config.Config
es *elasticsearch.Client
db *bolt.DB
offset map[string]int
}
func NewClient(config *Config) *Client {
client := &Client{
config: config,
offsets: make(map[string]int),
}
return client
}