Documentation ¶
Index ¶
- func Connect() (*elasticsearch.Client, error)
- func InsertBaseLog(client *elasticsearch.Client, log interface{}) error
- func InsertDatabaseLog(client *elasticsearch.Client, log interface{}) error
- func InsertFunctionLog(client *elasticsearch.Client, log interface{}) error
- func InsertRequestLog(client *elasticsearch.Client, log interface{}) error
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.