Skip to content

Instantly share code, notes, and snippets.

View guidoschmidt17's full-sized avatar

Guido Schmidt guidoschmidt17

  • München
View GitHub Profile
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]
<!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.
<!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.
<!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}
...
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
...
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
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.
<!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}
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.*
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.*