elastic

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect() (*elasticsearch.Client, error)

Connect establishes a connection to the ElasticSearch cluster.

It reads the ElasticSearch URI from the environment variable `ELASTIC_URI`.

Returns: - A pointer to an elasticsearch.Client instance. - An error, if the connection fails.

func InsertBaseLog

func InsertBaseLog(client *elasticsearch.Client, log interface{}) error

InsertBaseLog inserts a base log into the specified index in ElasticSearch.

Parameters: - client: A pointer to an elasticsearch.Client instance. - log: The base log to be inserted.

Returns: - An error if the operation fails.

func InsertDatabaseLog

func InsertDatabaseLog(client *elasticsearch.Client, log interface{}) error

InsertDatabaseLog inserts a database log into the specified index in ElasticSearch.

Parameters: - client: A pointer to an elasticsearch.Client instance. - log: The database log to be inserted.

Returns: - An error if the operation fails.

func InsertFunctionLog

func InsertFunctionLog(client *elasticsearch.Client, log interface{}) error

InsertFunctionLog inserts a function log into the specified index in ElasticSearch.

Parameters: - client: A pointer to an elasticsearch.Client instance. - log: The function log to be inserted.

Returns: - An error if the operation fails.

func InsertRequestLog

func InsertRequestLog(client *elasticsearch.Client, log interface{}) error

InsertRequestLog inserts a request log into the specified index in ElasticSearch.

Parameters: - client: A pointer to an elasticsearch.Client instance. - log: The request log to be inserted.

Returns: - An error if the operation fails.

Types

This section is empty.

Jump to

Keyboard shortcuts

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