-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support async command evaluation (#917)
- Loading branch information
1 parent
24ae4a9
commit bac8cc1
Showing
22 changed files
with
685 additions
and
786 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package zio.redis | ||
import zio.{IO, UIO} | ||
|
||
private[redis] trait GenRedis[G[+_]] | ||
extends api.Connection[G] | ||
with api.Geo[G] | ||
with api.Hashes[G] | ||
with api.HyperLogLog[G] | ||
with api.Keys[G] | ||
with api.Lists[G] | ||
with api.Sets[G] | ||
with api.Strings[G] | ||
with api.SortedSets[G] | ||
with api.Streams[G] | ||
with api.Scripting[G] | ||
with api.Cluster[G] | ||
with api.Publishing[G] | ||
|
||
private[redis] object GenRedis { | ||
type Async[+A] = UIO[IO[RedisError, A]] | ||
type Sync[+A] = IO[RedisError, A] | ||
|
||
def async[A](io: UIO[IO[RedisError, A]]) = io | ||
def sync[A](io: UIO[IO[RedisError, A]]) = io.flatten | ||
} |
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.