Skip to content

Commit

Permalink
Add documentation to http timeout configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Surdej committed Jan 11, 2024
1 parent 03f1f4d commit d0ccae0
Showing 1 changed file with 53 additions and 51 deletions.
104 changes: 53 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,14 @@ The Helm chart has its own [README](./chart/README.md).

The application can be configured using the following environment variables, which are also loaded from `.env` file:

| Variable Name | Description | Default Value |
| -------------- | ----------------------------------------------------------- | ----------------------- |
| `LOGSTASH_URL` | URL to Logstash API | `http://localhost:9600` |
| `PORT` | Port on which the application will be exposed | `9198` |
| `HOST` | Host on which the application will be exposed | empty string |
| `LOG_LEVEL` | [Log level](https://pkg.go.dev/golang.org/x/exp/slog#Level) | empty (defaults to info) |
| Variable Name | Description | Default Value |
|---------------|-----------------------------------------------------------------------------------------------|-------------------------|
| `LOGSTASH_URL`| URL to Logstash API | `http://localhost:9600` |
| `PORT` | Port on which the application will be exposed | `9198` |
| `HOST` | Host on which the application will be exposed | `""` (empty string) |
| `LOG_LEVEL` | [Log level](https://pkg.go.dev/golang.org/x/exp/slog#Level) (defaults to "info" if not set) | `""` (empty string) |
| `HTTP_TIMEOUT`| Timeout for HTTP requests to Logstash API in [Go duration format](https://golang.org/pkg/time/#ParseDuration) | `2s` |


All configuration variables can be checked in the [config directory](./config/).

Expand All @@ -105,7 +107,7 @@ All configuration variables can be checked in the [config directory](./config/).
#### Available Commands

<!--- GENERATED by ./scripts/add_descriptions_to_readme.sh --->

- `make all`: Builds binary executables for all OS (Win, Darwin, Linux).
- `make run`: Runs the Go Exporter application.
- `make build-linux`: Builds a binary executable for Linux.
Expand All @@ -127,7 +129,7 @@ All configuration variables can be checked in the [config directory](./config/).
- `make helm-readme`: Generates Helm chart README.md file.
- `make clean-elasticsearch`: Cleans Elasticsearch data, works only with default ES port. The command may take a very long time to complete.
- `make help`: Shows info about available commands.

<!--- **************************************************** --->

#### File Structure
Expand All @@ -138,91 +140,91 @@ The binary executables are saved in the out directory.
#### Example Usage

<!--- GENERATED by ./scripts/add_descriptions_to_readme.sh --->

Builds binary executables for all OS (Win, Darwin, Linux):

make all

Runs the Go Exporter application:

make run

Builds a binary executable for Linux:

make build-linux

Builds a binary executable for Darwin:

make build-darwin

Builds a binary executable for Windows:

make build-windows

Builds a Docker image for the Go Exporter application:

make build-docker

Builds a multi-arch Docker image (`amd64` and `arm64`):

make build-docker-multi

Deletes all binary executables in the out directory:

make clean

Runs all tests:

make test

Displays test coverage report:

make test-coverage

Starts a Docker-compose configuration:

make compose

Starts a Docker-compose configuration until it's ready:

make wait-for-compose

Stops a Docker-compose configuration:

make compose-down

Verifies the metrics from the Go Exporter application:

make verify-metrics

Pulls the Docker image from the registry:

make pull

Shows logs from the Docker-compose configuration:

make logs

Minifies the binary executables:

make minify

Installs readme-generator-for-helm tool:

make install-helm-readme

Generates Helm chart README.md file:

make helm-readme

Cleans Elasticsearch data, works only with default ES port. The command may take a very long time to complete:

make clean-elasticsearch

Shows info about available commands:

make help

<!--- **************************************************** --->

## Helper Scripts
Expand Down

0 comments on commit d0ccae0

Please sign in to comment.