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 zio.* | |
import zio.prelude.* | |
import zio.prelude.fx.* | |
object BaseSyntax: | |
type Program[S, R, E, A] = ZPure[Nothing, S, S, R, E, A] | |
type LoggedProgram[W, S, R, E, A] = ZPure[W, S, S, R, E, A] |
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
<!DOCTYPE html> | |
<html lang='en'> | |
<head> | |
<meta charset='utf-8'> | |
<style> | |
body {margin: 0; padding: 10px; background-color: #ffffff} | |
h1 {margin: 5px 0 0 0; font-size: 18px; font-weight: normal; text-align: center} | |
header {margin: -24px 0 5px 0; line-height: 24px} | |
button {font: 12px sans-serif; cursor: pointer} | |
p {margin: 5px 0 5px 0} |
This file has been truncated, but you can view the full file.
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
<!DOCTYPE html> | |
<html lang='en'> | |
<head> | |
<meta charset='utf-8'> | |
<style> | |
body {margin: 0; padding: 10px; background-color: #ffffff} | |
h1 {margin: 5px 0 0 0; font-size: 18px; font-weight: normal; text-align: center} | |
header {margin: -24px 0 5px 0; line-height: 24px} | |
button {font: 12px sans-serif; cursor: pointer} | |
p {margin: 5px 0 5px 0} |
This file has been truncated, but you can view the full file.
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
<!DOCTYPE html> | |
<html lang='en'> | |
<head> | |
<meta charset='utf-8'> | |
<style> | |
body {margin: 0; padding: 10px; background-color: #ffffff} | |
h1 {margin: 5px 0 0 0; font-size: 18px; font-weight: normal; text-align: center} | |
header {margin: -24px 0 5px 0; line-height: 24px} | |
button {font: 12px sans-serif; cursor: pointer} | |
p {margin: 5px 0 5px 0} |
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
... | |
def loopResult(out: Queue[Take[StreamingError, B]], offsetRef: Ref[Long], n: Long) = | |
def resultStream(offset: Long, limit: Long) = | |
sessionPool | |
.use(session => { | |
session | |
.prepare(query) | |
.toScopedZIO |
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
... | |
handle 18d6aade:11 ReadFactsBySerialId(0,[],500) -> Accepted(TransportEncodedStream) | |
before | |
stream 500 500 | |
after | |
handle 18d6aade:12 ReadFactsBySerialId(0,[],500) -> Accepted(TransportEncodedStream) | |
before | |
stream 64 64 | |
stream 128 64 | |
stream 192 64 |
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
def readResultWithOffset[A, B]( | |
check: Option[Query[A, Long]], | |
query: Query[A ~ Long ~ Long, B], | |
args: A, | |
message: String, | |
chunksize: Int, | |
limit: Long = Long.MaxValue | |
) = | |
val checkResult = |
This file has been truncated, but you can view the full file.
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
<!DOCTYPE html> | |
<html lang='en'> | |
<head> | |
<meta charset='utf-8'> | |
<style> | |
body {margin: 0; padding: 10px; background-color: #ffffff} | |
h1 {margin: 5px 0 0 0; font-size: 18px; font-weight: normal; text-align: center} | |
header {margin: -24px 0 5px 0; line-height: 24px} | |
button {font: 12px sans-serif; cursor: pointer} | |
p {margin: 5px 0 5px 0} |
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
package cqrs | |
package eventstore | |
package server | |
import cats.effect.std.Console | |
import fs2.io.net.SocketOption.* | |
import natchez.Trace.Implicits.noop | |
import skunk.Session | |
import zio.* | |
import zio.interop.catz.* |
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
package cqrs | |
package eventstore | |
package client | |
import sttp.capabilities.WebSockets | |
import sttp.capabilities.zio.ZioStreams | |
import sttp.client3.* | |
import sttp.model.Uri | |
import sttp.ws.* | |
import zio.* |
NewerOlder