elastic

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = types.Module{
	{CreateFunc: NewElastic},
	{CreateFunc: NewConfig},
	{CreateFunc: NewElasticConn},
}

Functions

func NewElastic

func NewElastic(cfg Config) (*elasticsearch.Client, error)

Types

type Config

type Config struct {
	DSN        string
	MaxRetries int
	WithLogger bool
}

func NewConfig

func NewConfig(cfg *config.Config) Config

type ElasticConn added in v1.0.23

type ElasticConn struct {
	// contains filtered or unexported fields
}

func NewElasticConn added in v1.0.23

func NewElasticConn(client *elasticsearch.Client) *ElasticConn

func (*ElasticConn) CallContext added in v1.0.23

func (ec *ElasticConn) CallContext(
	ctx context.Context,
	queryName string,
	callFunc func(ctx context.Context, client *elasticsearch.Client) error,
) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL