Skip to content

Commit

Permalink
Formatting consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
bartelink committed Mar 10, 2020
1 parent d68c643 commit aee5367
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions equinox-fc/Domain/Allocation.fs
Original file line number Diff line number Diff line change
Expand Up @@ -231,18 +231,18 @@ let create resolver =

module EventStore =

let resolver (context,cache) =
let resolver (context, cache) =
let cacheStrategy = Equinox.EventStore.CachingStrategy.SlidingWindow (cache, System.TimeSpan.FromMinutes 20.)
// while there are competing writers [which might cause us to have to retry a Transact], this should be infrequent
let opt = Equinox.ResolveOption.AllowStale
// We should be reaching Completed state frequently so no actual Snapshots should get written
fun id -> Equinox.EventStore.Resolver(context, Events.codec, Fold.fold, Fold.initial, cacheStrategy).Resolve(id,opt)
let create (context, cache) =
create (resolver (context,cache))
create (resolver (context, cache))

module Cosmos =

let resolver (context,cache) =
let resolver (context, cache) =
let cacheStrategy = Equinox.Cosmos.CachingStrategy.SlidingWindow (cache, System.TimeSpan.FromMinutes 20.)
// while there are competing writers [which might cause us to have to retry a Transact], this should be infrequent
let opt = Equinox.ResolveOption.AllowStale
Expand Down
6 changes: 3 additions & 3 deletions equinox-fc/Domain/Allocator.fs
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ let create resolver =
module EventStore =

let accessStrategy = Equinox.EventStore.AccessStrategy.LatestKnownEvent
let resolver (context,cache) =
let resolver (context, cache) =
let cacheStrategy = Equinox.EventStore.CachingStrategy.SlidingWindow (cache, System.TimeSpan.FromMinutes 20.)
// while there are competing writers [which might cause us to have to retry a Transact], this should be infrequent
let opt = Equinox.ResolveOption.AllowStale
fun id -> Equinox.EventStore.Resolver(context, Events.codec, Fold.fold, Fold.initial, cacheStrategy, accessStrategy).Resolve(id,opt)
let create (context, cache) =
create (resolver (context,cache))
create (resolver (context, cache))

module Cosmos =

Expand All @@ -75,4 +75,4 @@ module Cosmos =
let opt = Equinox.ResolveOption.AllowStale
fun id -> Equinox.Cosmos.Resolver(context, Events.codec, Fold.fold, Fold.initial, cacheStrategy, accessStrategy).Resolve(id,opt)
let create (context, cache) =
create (resolver (context,cache))
create (resolver (context, cache))
4 changes: 2 additions & 2 deletions equinox-fc/Domain/Ticket.fs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ let create resolver =
module EventStore =

let accessStrategy = Equinox.EventStore.AccessStrategy.LatestKnownEvent
let resolver (context,cache) =
let resolver (context, cache) =
let cacheStrategy = Equinox.EventStore.CachingStrategy.SlidingWindow (cache, System.TimeSpan.FromMinutes 20.)
// because we only ever need the last event, we use the Equinox.EventStore access strategy that optimizes around that
Equinox.EventStore.Resolver(context, Events.codec, Fold.fold, Fold.initial, cacheStrategy, accessStrategy).Resolve
Expand All @@ -76,7 +76,7 @@ module EventStore =
module Cosmos =

let accessStrategy = Equinox.Cosmos.AccessStrategy.LatestKnownEvent
let resolver (context,cache) =
let resolver (context, cache) =
let cacheStrategy = Equinox.Cosmos.CachingStrategy.SlidingWindow (cache, System.TimeSpan.FromMinutes 20.)
// because we only ever need the last event to build the state, we feed the events we are writing
// (there's always exactly one if we are writing), into the unfolds slot so a single point read with etag check gets us state in one trip
Expand Down
4 changes: 2 additions & 2 deletions equinox-fc/Domain/TicketList.fs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ let create resolver =

module EventStore =

let resolver (context,cache) =
let resolver (context, cache) =
let cacheStrategy = Equinox.EventStore.CachingStrategy.SlidingWindow (cache, System.TimeSpan.FromMinutes 20.)
// while there are competing writers (which might cause us to have to retry a Transact and discover it is redundant), there is never a cost to being wrong
let opt = Equinox.ResolveOption.AllowStale
Expand All @@ -56,7 +56,7 @@ module EventStore =

module Cosmos =

let resolver (context,cache) =
let resolver (context, cache) =
let cacheStrategy = Equinox.Cosmos.CachingStrategy.SlidingWindow (cache, System.TimeSpan.FromMinutes 20.)
// while there are competing writers (which might cause us to have to retry a Transact and discover it is redundant), there is never a cost to being wrong
let opt = Equinox.ResolveOption.AllowStale
Expand Down

0 comments on commit aee5367

Please sign in to comment.