#bgp #bgpkit #api

bgpkit-broker

A library to access BGPKIT Broker API and enable searching for BGP data archive files over time from public available data sources

9 unstable releases (3 breaking)

0.4.1 Jul 10, 2022
0.4.0 May 4, 2022
0.3.2 Oct 29, 2021
0.2.0 Oct 22, 2021
0.1.2 Oct 21, 2021

#51 in Compression

Download history 2/week @ 2022-04-20 23/week @ 2022-04-27 81/week @ 2022-05-04 132/week @ 2022-05-11 37/week @ 2022-05-18 34/week @ 2022-05-25 57/week @ 2022-06-01 29/week @ 2022-06-08 5/week @ 2022-06-15 5/week @ 2022-06-22 2/week @ 2022-06-29 52/week @ 2022-07-06 40/week @ 2022-07-13 29/week @ 2022-07-20 39/week @ 2022-07-27 19/week @ 2022-08-03

131 downloads per month
Used in 2 crates

MIT license

26KB
382 lines

BGPKIT Broker

Rust Crates.io MIT licensed Twitter

BGPKIT Broker is an online data API service that allows users to search for publicly available BGP archive files by time, collector, project, or data type. The service indexes the archives in close to real-time (delay is less than 5 minutes). Currently, we are indexing BGP table dump and updates files from RIPE RIS and RouteViews.

This Rust library provides access to the BGPKIT Broker API with the capability to search and paginate results.

Example

use bgpkit_broker::{BgpkitBroker, BrokerItem, QueryParams};

fn main() {
    
    let broker = BgpkitBroker::new_with_params(
        "https://api.broker.bgpkit.com/v2",
        QueryParams{
            ts_start: Some(1634693400),
            ts_end: Some(1634693400),
            page: 2,
            ..Default::default()
        });


    // method 1: create iterator from reference (so that you can reuse the broker object)
    // same as `&broker.into_iter()`
    for item in &broker {
        println!("{:?}", item);
    }

    // method 2: create iterator from the broker object (taking ownership)
    let items = broker.into_iter().collect::<Vec<BrokerItem>>();

    assert_eq!(items.len(), 106);
}

Contribution

Issues and Pull Requests

If you found any issues of this Rust library or would like to contribute to the code base, please feel free to open an issue or pull request. Code or documentation issues/PRs are both welcome.

Data Provider

If you have publicly available data and want to be indexed BGPKIT Broker service, please send us an email at data@bgpkit.com. Our back-end service is designed to be flexible and should be able to adapt to most data archiving approaches.

On-premise Deployment

We provide service to allow companies to host their own BGP Broker backend on-premise to allow maximum performance and customization. If you are interested in deploying one, please contact us at contact@bgpkit.com.

Built with ❤️ by BGPKIT Team

BGPKIT is a small-team start-up that focus on building the best tooling for BGP data in Rust. We have 10 years of experience working with BGP data and believe that our work can enable more companies to start keeping tracks of BGP data on their own turf. Learn more about what services we provide at https://bgpkit.com.

https://bgpkit.com/favicon.ico

Dependencies

~4–13MB
~263K SLoC