request

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

View Source
const API = "/_search"

Variables

This section is empty.

Functions

func APIRequest

func APIRequest(url, method string, auth string, request models.ReadCsv) (models.ResponseBody, error)

APIRequest makes an API request to the specified URL using the specified HTTP method and authentication header. It returns a models.ResponseBody struct containing the API response body and an error (if any).

func AsyncAPIRequest

func AsyncAPIRequest(users []models.ReadCsv, numberOfWorkers int, url string, method string, auth string) ([]models.ResponseBody, error)

AsyncAPIRequest makes API requests asynchronously

func StreamInputs

func StreamInputs(done <-chan struct{}, inputs []models.ReadCsv) <-chan models.ReadCsv

StreamInputs sends inputs from a slice to a channel

Types

This section is empty.

Jump to

Keyboard shortcuts

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