-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Track Equinox, Propulsion updates (#131)
* Category names * Handle arrays * module Stream * Sink/Pruner Stats * Match -> For
- Loading branch information
Showing
148 changed files
with
1,912 additions
and
1,880 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=discernable/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Esdb/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Favorited/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=idempotently/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=roundtripping/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Unfavorite/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Unfavorited/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=wireup/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary> |
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,40 @@ | ||
module Patterns.Domain.Store | ||
|
||
let log = Serilog.Log.ForContext("isMetric", true) | ||
let resolveDecider cat = Equinox.Decider.resolve log cat | ||
module Metrics = | ||
|
||
module Codec = | ||
let log = Serilog.Log.ForContext("isMetric", true) | ||
|
||
let createDecider cat = Equinox.Decider.forStream Metrics.log cat | ||
|
||
open FsCodec.SystemTextJson | ||
module Codec = | ||
|
||
let gen<'t when 't :> TypeShape.UnionContract.IUnionContract> = | ||
Codec.Create<'t>() // options = Options.Default | ||
FsCodec.SystemTextJson.Codec.Create<'t>() // options = Options.Default | ||
let genJsonElement<'t when 't :> TypeShape.UnionContract.IUnionContract> = | ||
CodecJsonElement.Create<'t>() // options = Options.Default | ||
FsCodec.SystemTextJson.CodecJsonElement.Create<'t>() // options = Options.Default | ||
|
||
module Memory = | ||
|
||
let create codec initial fold store: Equinox.Category<_, _, _> = | ||
Equinox.MemoryStore.MemoryStoreCategory(store, FsCodec.Deflate.EncodeUncompressed codec, fold, initial) | ||
let create name codec initial fold store: Equinox.Category<_, _, _> = | ||
Equinox.MemoryStore.MemoryStoreCategory(store, name, FsCodec.Deflate.EncodeUncompressed codec, fold, initial) | ||
|
||
let private defaultCacheDuration = System.TimeSpan.FromMinutes 20 | ||
let private cacheStrategy cache = Equinox.CachingStrategy.SlidingWindow (cache, defaultCacheDuration) | ||
|
||
module Cosmos = | ||
|
||
let private createCached codec initial fold accessStrategy (context, cache) = | ||
let cacheStrategy = Equinox.CosmosStore.CachingStrategy.SlidingWindow (cache, System.TimeSpan.FromMinutes 20.) | ||
Equinox.CosmosStore.CosmosStoreCategory(context, codec, fold, initial, cacheStrategy, accessStrategy) | ||
let private createCached name codec initial fold accessStrategy (context, cache) = | ||
Equinox.CosmosStore.CosmosStoreCategory(context, name, codec, fold, initial, accessStrategy, cacheStrategy cache) | ||
|
||
let createUnoptimized codec initial fold (context, cache) = | ||
let createUnoptimized name codec initial fold (context, cache) = | ||
let accessStrategy = Equinox.CosmosStore.AccessStrategy.Unoptimized | ||
createCached codec initial fold accessStrategy (context, cache) | ||
createCached name codec initial fold accessStrategy (context, cache) | ||
|
||
let createSnapshotted codec initial fold (isOrigin, toSnapshot) (context, cache) = | ||
let createSnapshotted name codec initial fold (isOrigin, toSnapshot) (context, cache) = | ||
let accessStrategy = Equinox.CosmosStore.AccessStrategy.Snapshot (isOrigin, toSnapshot) | ||
createCached codec initial fold accessStrategy (context, cache) | ||
createCached name codec initial fold accessStrategy (context, cache) | ||
|
||
[<NoComparison; NoEquality; RequireQualifiedAccess>] | ||
type Context<'t> = | ||
type Config<'t> = | ||
| Memory of Equinox.MemoryStore.VolatileStore<'t> | ||
| Cosmos of Equinox.CosmosStore.CosmosStoreContext * Equinox.Cache |
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
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
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
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
Oops, something went wrong.