wspr_cdk 0.0.12

This crate provides an abstraction that allows you to do analysis on wspr's real time spot data.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::state::prelude::*;

pub trait Reducer {
    fn reduce(&mut self, action: &ClickHouseAction);
}

impl Reducer for ClickHouseState {
    fn reduce(&mut self, action: &ClickHouseAction) {
        match action {
            ClickHouseAction::Get => {
                self.STATUS = "Fetching all records.".to_string();
            }
            ClickHouseAction::GetById(id) => {
                self.STATUS = format!("Fetching records with Id: {}", id);
            }
        }
    }
}