@whitewater-guide/gorge 2.4.0-beta.8 → 3.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +20 -18
  2. package/index.d.ts +9 -3
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -84,24 +84,26 @@ command:
84
84
  Here is the list of available flags:
85
85
 
86
86
  ```
87
- --cache string Either 'inmemory' or 'redis' (default "redis")
88
- --db string Either 'inmemory' or 'postgres' (default "postgres")
89
- --db-chunk-size int Measurements will be saved to db in chunks of this size. When set to 0, they will be saved in one chunk, which can cause errors
90
- --debug Enables debug mode, sets log level to debug
91
- --endpoint string Endpoint path (default "/")
92
- --http-proxy string HTTP client proxy (for example, you can use mitm for local development)
93
- --http-timeout int Request timeout in seconds (default 60)
94
- --http-user-agent string User agent for requests sent from scripts. Leave empty to use fake browser agent (default "whitewater.guide robot")
95
- --http-without-tls Disable TLS for some gauges
96
- --log-format string Set this to 'json' to output log in json (default "json")
97
- --log-level string Log level. Leave empty to discard logs (default "info")
98
- --pg-db string Postgres database (default "postgres")
99
- --pg-host string Postgres host (default "db")
100
- --pg-password string Postgres password [env POSTGRES_PASSWORD]
101
- --pg-user string Postgres user (default "postgres")
102
- --port string Port (default "7080")
103
- --redis-host string Redis host (default "redis")
104
- --redis-port string Redis port (default "6379")
87
+ --cache string either 'inmemory' or 'redis' (default "redis")
88
+ --db string either 'inmemory' or 'postgres' (default "postgres")
89
+ --db-chunk-size int measurements will be saved to db in chunks of this size. When set to 0, they will be saved in one chunk, which can cause errors
90
+ --debug enables debug mode, sets log level to debug
91
+ --endpoint string endpoint path (default "/")
92
+ --hooks-health-headers strings headers to set on request, in 'Header: Value' format, similar to curl (default [])
93
+ --hooks-health-url string external endpoint to call with list of unhealthy jobs
94
+ --http-proxy string HTTP client proxy (for example, you can use mitm for local development)
95
+ --http-timeout int Request timeout in seconds (default 60)
96
+ --http-user-agent string User agent for requests sent from scripts. Leave empty to use fake browser agent (default "whitewater.guide robot")
97
+ --http-without-tls Disable TLS for some gauges
98
+ --log-format string set this to 'json' to output log in json (default "json")
99
+ --log-level string log level. Leave empty to discard logs (default "info")
100
+ --pg-db string postgres database (default "postgres")
101
+ --pg-host string postgres host (default "db")
102
+ --pg-password string postgres password [env POSTGRES_PASSWORD]
103
+ --pg-user string postgres user (default "postgres")
104
+ --port string port (default "7080")
105
+ --redis-host string redis host (default "redis")
106
+ --redis-port string redis port (default "6379")
105
107
  ```
106
108
 
107
109
  Gorge uses database to store harvested measurements and scheduled jobs. It comes with postgres and sqlite drivers. Gorge will initialize all the required tables. Check out sql migration file if you're curious about db schema.
package/index.d.ts CHANGED
@@ -24,11 +24,11 @@ export interface Measurement {
24
24
  flow: number | null;
25
25
  }
26
26
  export interface Status {
27
- success: boolean;
28
- timestamp: string;
27
+ lastRun: string;
29
28
  error?: string;
30
29
  count: number;
31
- next?: string;
30
+ lastSuccess?: string;
31
+ nextRun?: string;
32
32
  }
33
33
  export interface JobDescription {
34
34
  id: string;
@@ -38,6 +38,12 @@ export interface JobDescription {
38
38
  options: {[key: string]: any} | null;
39
39
  status?: Status;
40
40
  }
41
+ export interface UnhealthyJob {
42
+ id: string;
43
+ script: string;
44
+ last_run: string;
45
+ last_success?: string;
46
+ }
41
47
  export interface ScriptDescriptor {
42
48
  name: string;
43
49
  description: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whitewater-guide/gorge",
3
- "version": "2.4.0-beta.8",
3
+ "version": "3.0.0-beta.1",
4
4
  "description": "Hydrological data harvester",
5
5
  "main": "",
6
6
  "types": "index",