Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mranv/ocsf-rust-crawler
This Rust application fetches JSON data from a configurable URL and saves the response to a file. It runs for a specified duration, printing output and errors.
https://github.com/mranv/ocsf-rust-crawler
api ocsf ocsf-server rust-lang
Last synced: 4 days ago
JSON representation
This Rust application fetches JSON data from a configurable URL and saves the response to a file. It runs for a specified duration, printing output and errors.
- Host: GitHub
- URL: https://github.com/mranv/ocsf-rust-crawler
- Owner: mranv
- License: apache-2.0
- Created: 2023-11-28T07:15:03.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2023-11-28T07:43:34.000Z (12 months ago)
- Last Synced: 2023-11-28T08:28:58.228Z (12 months ago)
- Topics: api, ocsf, ocsf-server, rust-lang
- Language: Rust
- Homepage: https://github.com/mranv/ocsf-rust-crawler
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OCSF Rust Crawler
This Rust application fetches JSON data from a specified URL ( The url is taken after running the OCSF Schema Server docker image. ) and saves it to a file every second.
## Usage
1. Clone the repository
```
git clone https://github.com/mranv/ocsf-rust-crawler
```2. Build the application
```
cargo build
```3. Run the application
```
cargo run
```## Configuration
The following parameters can be configured in `main.rs`:
- `url` - URL to fetch JSON data from
- `duration` - Total runtime of the application
- `interval` - Interval (in seconds) between fetches## Output
- Fetched JSON data is saved to a file named `ocsf_schema_sample_data.json`
- Status and errors are printed to stdout## Dependencies
- reqwest
- serde
- serde_json
- chrono## License
This project is licensed under the MIT License. See [LICENSE](LICENSE) file for details.