This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let (self_commands, mut self_commands_receiver) = mpsc::unbounded_channel(); | |
let (entity_manager_task, commands) = entity_manager::task( | |
Behavior { | |
self_commands, | |
}, | |
file_log_topic_adapter, | |
MAX_COMMANDS, | |
MAX_ENTITIES, | |
); | |
let task_commands = commands.clone().downgrade(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// The entity | |
pub struct Configuration {} | |
/// The FSM's states | |
pub enum State { | |
RootKeyGenerated, | |
Uninitialised, | |
VpnKeyGenerated { configuration: Configuration }, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-06/schema#", | |
"$id": "urn:OCPP:Cp:2:2020:3:TransactionEventRequest", | |
"comment": "OCPP 2.0.1 FINAL", | |
"definitions": { | |
"CustomDataType": { | |
"description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.", | |
"javaType": "CustomData", | |
"type": "object", | |
"properties": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//! An EventSource is an agent that can be subscribed and, upon server sent events | |
//! being received, the subscribers are notified. | |
use std::collections::HashSet; | |
use serde::de::DeserializeOwned; | |
use wasm_bindgen::{prelude::*, JsCast}; | |
use web_sys::MessageEvent; | |
use yew::worker::{Agent, AgentLink, Context, HandlerId}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use nom::{ | |
bytes::complete::take_while1, | |
character::complete::{char, line_ending, not_line_ending}, | |
combinator::opt, | |
sequence::pair, | |
IResult, | |
}; | |
#[derive(Debug, PartialEq)] | |
pub enum Field { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Re-creates https://doc.akka.io/docs/akka/current/typed/actors.html#first-example | |
// The messages | |
struct Greet { | |
whom: String, | |
reply_to: ActorRef<Greeted>, | |
} | |
struct Greeted { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate alloc; | |
use core::alloc::{GlobalAlloc, Layout}; | |
/// In the absence of std, we need our own c_void so that cbindgen is happy to | |
/// generate void* | |
#[allow(non_camel_case_types)] | |
pub struct c_void; | |
/// An allocator that provides the ability to be configured with an outside allocator. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import akka.stream.scaladsl.Source | |
def serviceStreamWithConfigMap[CK, CV, E, M]( | |
staticConfig: Source[(CK, CV), M], | |
dynamicConfig: Source[(CK, CV), M], | |
serviceStream: Source[E, M]) : Source[(E, Map[CK, CV]), M] = | |
staticConfig | |
.fold(Right[(CK, CV), Map[CK, CV]](Map.empty)) { | |
case (Right(config), (k, v)) => Right(config.updated(k, v)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"selectedComponent": "local.server.4.5", | |
"showingDeleteDialog": false, | |
"showingApplyDialog": false, | |
"showingClearDialog": false, | |
"showingDiscardDialog": false, | |
"children": { | |
"local.server.1": { | |
"instanceId": "local.server.1", | |
"uuid": "1800", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* AS IT WAS WITH OPENTRACING | |
* Utilities to transform headers of a Durable Queue message into | |
* Open Tracing span contexts and vice-versa. | |
*/ | |
object Propagation { | |
/** | |
* Return a span context from headers and a tracer. | |
*/ |
NewerOlder