elasticstream/source/elastic/client.go

25 lines
362 B
Go
Raw Normal View History

2024-10-07 15:25:13 +05:30
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
}