/
Library.fs
44 lines (29 loc) · 828 Bytes
/
Library.fs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
module Contracts
type UserId = UserId of string
module Byke =
open Orleankka.FSharp
open Orleankka
type Message =
| Reserve of UserId
| CancelReservation of UserId
| StartTrip of UserId
| EndTrip of UserId
| IsAvailable
exception BykeIsReserved
type IByke =
inherit IActorGrain<Message>
module Bugger =
/// Need to explicitly reference smth from Orleans
/// as F# linker is being too agressive and removes reference
/// to Orleans.Abstractions which is required for codegen to work
type IFSharpGotcha =
inherit Orleans.IGrainWithGuidKey
module UserWallet =
open Orleankka.FSharp
type Message =
| ``Reserve minimum amount for trip``
| Topup of decimal
| Charge of decimal
exception AmountNotEnough
type IUserWallet =
inherit IActorGrain<Message>