diff --git a/.air.toml b/.air.toml deleted file mode 100644 index 2c2182c..0000000 --- a/.air.toml +++ /dev/null @@ -1,7 +0,0 @@ -root = "." -tmp_dir = "tmp" - -[build] - cmd = "go build -o ./tmp/app ." - bin = "./tmp/app" - include_ext = ["go"] \ No newline at end of file diff --git a/main.go b/cmd/main.go similarity index 100% rename from main.go rename to cmd/main.go diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 916e55f..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,16 +0,0 @@ -services: - exporter: - image: cosmtrek/air:v1.61.7 - volumes: - - .:/app - working_dir: /app - ports: - - "9101:9101" - command: ["air", "-c", ".air.toml"] - - prometheus: - image: prom/prometheus:v3.1.0 - volumes: - - ./prometheus.yml:/etc/prometheus/prometheus.yml - ports: - - "9090:9090" \ No newline at end of file diff --git a/prometheus.yml b/prometheus.yml deleted file mode 100644 index 6139fdf..0000000 --- a/prometheus.yml +++ /dev/null @@ -1,7 +0,0 @@ -global: - scrape_interval: 1s # Интервал сбора метрик - -scrape_configs: - - job_name: "exporter" - static_configs: - - targets: ["exporter:9101"] # Сервис экспортёра diff --git a/test_api.txt b/test_api.txt deleted file mode 100644 index e4c2e7f..0000000 --- a/test_api.txt +++ /dev/null @@ -1,12 +0,0 @@ -curl -X POST -H "Content-Type: application/json" -d '{ - "id": "gauge_test", - "name": "Gauge Metric", - "url": "http://127.0.0.1:8081/gauge", - "method": "GET", - "type": "gauge", - "metrics": { - "temperature": 36.6 - } -}' "http://localhost:9101/update" - -curl http://localhost:9101/metrics \ No newline at end of file diff --git a/exporter_test.go b/tests/unit/exporter_test.go similarity index 100% rename from exporter_test.go rename to tests/unit/exporter_test.go