32 releases (12 breaking)

Uses new Rust 2021

new 0.13.1 Jun 23, 2022
0.12.0 Jun 9, 2022
0.11.0 Mar 2, 2022
0.10.0 Dec 28, 2021
0.1.4 Jul 28, 2020

#108 in Rust patterns

Download history 384/week @ 2022-03-08 360/week @ 2022-03-15 399/week @ 2022-03-22 260/week @ 2022-03-29 262/week @ 2022-04-05 223/week @ 2022-04-12 271/week @ 2022-04-19 599/week @ 2022-04-26 579/week @ 2022-05-03 791/week @ 2022-05-10 427/week @ 2022-05-17 556/week @ 2022-05-24 532/week @ 2022-05-31 614/week @ 2022-06-07 534/week @ 2022-06-14 510/week @ 2022-06-21

2,271 downloads per month
Used in prima-tracing

MIT license

80KB
2K SLoC

Build Status

bridge.rs

Prima bridge pattern implementation for rust

Api documentation

Examples

You can find all the examples in examples directory.


lib.rs:

This crate gives an high level api to execute external request.

It is supposed to give the basics building blocks for building bridges to other services while abstracting the low level stuffs like adding custom headers and request tracing.

Right now it supports Rest and GraphQL requests.

You should start by creating a Bridge instance. This instance should live for all the application lifetime.

Do not create a new bridge on every request!

You should use something like once_cell or lazy_static, or some sort of inversion of control container to pass around.

The bridge implement a type state pattern to build the external request.

Dependencies

~0.8–12MB
~236K SLoC