[][src]Struct interledger_store_redis::RedisStore

pub struct RedisStore {
    pub ilp_address: Arc<RwLock<Address>>,
    // some fields omitted
}

A Store that uses Redis as its underlying database.

This store leverages atomic Redis transactions to do operations such as balance updates.

Currently the RedisStore polls the database for the routing table and rate updates, but future versions of it will use PubSub to subscribe to updates.

Fields

ilp_address: Arc<RwLock<Address>>

Methods

impl RedisStore[src]

pub fn get_all_accounts_ids(
    &self
) -> impl Future<Item = Vec<AccountId>, Error = ()>
[src]

Trait Implementations

impl Clone for RedisStore[src]

impl NodeStore for RedisStore[src]

type Account = Account

impl HttpStore for RedisStore[src]

type Account = Account

fn get_account_from_http_auth(
    &self,
    username: &Username,
    token: &str
) -> Box<dyn Future<Item = Self::Account, Error = ()> + Send>
[src]

Checks if the stored token for the provided account id matches the provided token, and if so, returns the account associated with that token

impl RouterStore for RedisStore[src]

impl AddressStore for RedisStore[src]

impl BalanceStore for RedisStore[src]

fn get_balance(
    &self,
    account: Account
) -> Box<dyn Future<Item = i64, Error = ()> + Send>
[src]

Returns the balance from the account holder's perspective, meaning the sum of the Payable Balance and Pending Outgoing minus the Receivable Balance and the Pending Incoming.

impl ExchangeRateStore for RedisStore[src]

impl StreamNotificationsStore for RedisStore[src]

impl SettlementStore for RedisStore[src]

type Account = Account

impl AccountStore for RedisStore[src]

type Account = Account

impl IdempotentStore for RedisStore[src]

impl RateLimitStore for RedisStore[src]

type Account = Account

fn apply_rate_limits(
    &self,
    account: Account,
    prepare_amount: u64
) -> Box<dyn Future<Item = (), Error = RateLimitError> + Send>
[src]

Apply rate limits for number of packets per minute and amount of money per minute

This uses https://github.com/brandur/redis-cell so the redis-cell module MUST be loaded into redis before this is run

impl LeftoversStore for RedisStore[src]

type AccountId = AccountId

type AssetType = BigUint

impl BtpStore for RedisStore[src]

type Account = Account

impl RouteManagerStore for RedisStore[src]

type Account = Account

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,