This file contains hidden or 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
public class ModulesActor : ReceiveActor, IUnboundedStash | |
{ | |
private Dictionary<string, Tuple<Props, ModuleState>> _moduleRecipes; | |
public Stash Stash { get; set; } | |
public ModulesActor() | |
{ | |
Ready(); | |
} |
This file contains hidden or 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
namespace FSharp.Data.GraphQL | |
open System | |
[<Struct>] | |
type AsyncVal<'T> = | |
val Value : 'T | |
val Async : Async<'T> | |
new (value: 'T) = { Value = value; Async = Unchecked.defaultof<Async<'T>> } | |
new (async: Async<'T>) = { Value = Unchecked.defaultof<'T>; Async = async } |
This file contains hidden or 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
public class MyActor : ReceiveActor | |
{ | |
public MyActor() | |
{ | |
Receive<Debug>(e => Log(e.ToString())); | |
Receive<Info>(e => Log(e.ToString())); | |
Receive<Warning>(e => Log(e.ToString())); | |
Receive<Error>(e => Log(e.ToString())); | |
Receive<InitializeLogger>(_ => Sender.Tell(new LoggerInitialized())); | |
} |
This file contains hidden or 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
using System; | |
namespace Akka.Testing | |
{ | |
public interface IMyMessage { } | |
public sealed class MessageA : IMyMessage { } | |
public sealed class MessageB : IMyMessage { } | |
public class MyActor : Actor<IMyMessage> | |
{ |
This file contains hidden or 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
// HList | |
class HList { } | |
class HNil extends HList { | |
static readonly instance = new HNil(); | |
private constructor() { | |
super(); | |
} | |
} | |
class HCons<Value, Next extends HList> extends HList { |
This file contains hidden or 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
[WARNING][22.10.2016 20:37:42][Thread 0001][ActorSystem(TestRunnerLogging)] NewtonSoftJsonSerializer has been detected as a default serializer. It will be obsoleted in Akka.NET starting from version 1.5 in the favor of Wire (for more info visit: http://getakka.net/docs/Serialization#how-to-setup-wire-as-default-serializer ). If you want to suppress this message set HOCON `akka.suppress-json-serializer-warning` config flag to on. | |
[INFO][22.10.2016 20:37:42][Thread 0006][akka://TestRunnerLogging/deadLetters] Message Bound from akka://TestRunnerLogging/system/IO-TCP/selectors/$a/0 to akka://TestRunnerLogging/deadLetters was not delivered. 1 dead letters encountered. | |
[RUNNER][22.10.2016 20:37:44][INFO][Akka.MultiNodeTestRunner.Shared]: Starting test Spec | |
[RUNNER][20:37]: Beginning spec Akka.Cluster.Tests.MultiNode.MemberWeaklyUpMultiNode.Spec on 5 nodes | |
[RUNNER][22.10.2016 20:37:44][INFO][Akka.MultiNodeTestRunner.Shared]: Started node 1 on pid 5396 | |
[RUNNER][22.10.2016 20:37:44][INFO][Akka |
This file contains hidden or 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
const withCommunities = graphql(gql` | |
query CommunitiesQuery($offset: Int!, $limit: Int!) { | |
viewer { | |
communities(offset: $offset, limit: $limit) { | |
totalCount, | |
elements { | |
id | |
...communityInfo | |
} | |
} |
This file contains hidden or 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
type Distance = float | |
type Angle = float | |
type PenColor = string | |
type TurtleProgram = | |
// (input params) (response) | |
| Stop | |
| Move of Distance * TurtleProgram | |
| Turn of Angle * TurtleProgram | |
| PenUp of (* none *) TurtleProgram |
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.Collections.Immutable; | |
using System.Threading.Tasks; | |
using Akka.Actor; | |
using Akka.Persistence.Query; | |
using Akka.Persistence.Query.Sql; | |
using Akka.Streams; | |
using Akka.Streams.Dsl; |
This file contains hidden or 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
// Delivery mechanism looks like this - if sender wants to reliably deliver payload to recipient | |
// using at-least-once delivery semantics, it sends that payload wrapped to Messenger actor, which | |
// is responsible for the persistence and redelivery: | |
// | |
// +--------+ +-----------+ +-----------+ | |
// | |--(DeliverOrder<T>)-->| |--(Delivery<T>:1)-->| | | |
// | | | | /* 2nd attempt */ | | | |
// | Sender | | Messenger |--(Delivery<T>:2)-->| Recipient | | |
// | | | | | | | |
// | | | |<----(Confirm:2)----| | |