package protocol
- Source
- package.scala
- Alphabetic
- By Inheritance
- protocol
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- trait AllBListProtocol extends BListProtocol with BListProtocolExtra
- trait AllHashProtocol extends HashProtocol with HashProtocolExtra
- trait AllHyperLogLogProtocol extends HyperLogLogProtocol with HyperLogLogProtocolExtra
- trait AllKeyProtocol extends KeyProtocol with KeyProtocolExtra
- trait AllListProtocol extends ListProtocol with ListProtocolExtra
- trait AllSetProtocol extends SetProtocol with SetProtocolExtra
- trait AllSortedSetProtocol extends SortedSetProtocol with SortedSetProtocolExtra
- trait AllStringProtocol extends StringProtocol with StringProtocolExtra
-
sealed
trait
Array extends RESP
RESP Arrays
RESP Arrays
There can be 2 cases:
nil
arrays, where the length is -1 and no array element is present- actual (non-nil) arrays, where the length is >= 0
Non-nil Arrays can be constructed using the RESPBuilders#arr(xs: Seq[RESP]) method.
import laserdisc.protocol.RESP._ val nonNilArray: NonNilArray = arr(Vector(str("hello"), str("world"))) val guaranteedNonEmptyArray: NonNilArray = arr(str("hello"), str("world")) val emptyArray: NonNilArray = arr(Vector.empty) val nilArray: NilArray = nilArray
- Note
A forwarder for
,nil
is present too and represented using thefinal val
s RESPBuilders.nilArrayRESPBuilders#arr(one: RESP, rest: RESP*) is an overload which supports the creation of guaranteed non-empty sequences only. This is achieved through the usage of one fixed parameter followed by a var-arg of the same
Example: -
sealed
trait
AtLeastN[L <: HList, N <: Nat, A] extends DepFn0 with Serializable
This type-class serves two purposes:
This type-class serves two purposes:
- L
The HList that will be verified to contain only types that are subtypes of A
- N
The minimum number of types (subtypes of A) that are needed to be present in L
- A
The supertype of all types present in L
- Annotations
- @implicitNotFound( ... )
- trait BListProtocol extends AnyRef
- trait BListProtocolExtra extends AnyRef
-
sealed
trait
BulkString extends RESP
RESP Bulk Strings
RESP Bulk Strings
There can be 2 cases:
null
bulk strings, where the length is -1 and no actual underlying string is present- actual (non-null) bulk strings, where the length is >= 0
Non-null BulkStrings can be constructed using the RESPBuilders#bulk method
import laserdisc.protocol.RESP._ val nonNullBulkString: NonNullBulkString = bulk("some string") val nullBulkString: NullBulkString = nullBulk
- Note
A forwarder for
null
BulkStrings is present too and represented using thefinal val
s RESPBuilders.nullBulk- See also
Example: - final type ConnectionName = Refined[String, And[NonEmpty, Forall[Not[Whitespace]]]]
- trait ConnectionProtocol extends AnyRef
- final type DbIndex = Refined[Int, Closed[_0, shapeless.Nat._15]]
- final type Double = Refined[scala.Double, NonNaN]
-
sealed abstract
class
Error extends LaserDiscRuntimeError with RESP
RESP Errors
RESP Errors
RESP Errors are also scala.RuntimeExceptions, although where possible they will not contain stacktrace data
These can be constructed by using the RESPBuilders#err method
import laserdisc.protocol.RESP._ val error: Error = err("some error message")
Example: - final type GlobPattern = Refined[String, MatchesRegex[String("(\\[?[\\w\\*\\?]+\\]?)+")]]
- trait HashProtocol extends AnyRef
- trait HashProtocolExtra extends AnyRef
- trait HyperLogLogProtocol extends AnyRef
- trait HyperLogLogProtocolExtra extends AnyRef
- final type Index = Refined[Long, True]
-
sealed abstract
class
Integer extends RESP
RESP Integers
RESP Integers
These can be constructed by using the RESPBuilders#int method
import laserdisc.protocol.RESP._ val integer: Integer = int(42)
- Note
Sometimes the values 0 and 1 are used to represent boolean values. In this case 0 corresponds to False while 1 to True, respectively. These are represented using the
final val
s RESPBuilders.falseI and RESPBuilders.trueI, respectively
Example: - trait KeyProtocol extends AnyRef
- trait KeyProtocolExtra extends AnyRef
- final case class KeyValue[A, B](key: A, value: B) extends Product2[A, B] with Product with Serializable
- trait ListProtocol extends AnyRef
- trait ListProtocolExtra extends AnyRef
- trait LowPriorityRESPParamWrite extends LowestPriorityRESPParamWrite
- trait LowPriorityReadInstances extends AnyRef
- trait LowPriorityShowInstances extends AnyRef
- sealed trait LowestPriorityRESPParamWrite extends AnyRef
- final case class NaN() extends Product with Serializable
- sealed trait NilArray extends Array
- final type NonEmptyString = Refined[String, NonEmpty]
- final type NonNegInt = Refined[Int, Greater[Int(-1)]]
- final type NonNegLong = Refined[Long, Greater[Long(-1L)]]
-
sealed abstract
class
NonNilArray extends Array
This is the special case of a non-nil RESP Array
This is the special case of a non-nil RESP Array
These can be constructed by using the RESPBuilders#arr(xs: Seq[RESP]) method
or
by resorting to the overloaded RESPBuilders#arr(one: RESP, rest: RESP*) method which expects one parameter to be supplied followed by a (possibly empty) sequence of RESPs (vararg).
-
sealed abstract
class
NonNullBulkString extends BulkString
This is the special case of a non-null RESP BulkString
This is the special case of a non-null RESP BulkString
These can be constructed by using the RESPBuilders#bulk method
- final type NonZeroDouble = Refined[scala.Double, And[NonNaN, NonZero]]
- final type NonZeroInt = Refined[Int, NonZero]
- final type NonZeroLong = Refined[Long, NonZero]
- sealed trait NullBulkString extends BulkString
- sealed trait OK extends AnyRef
- final type PosInt = Refined[Int, Greater[Int(0)]]
- final type PosLong = Refined[Long, Greater[Long(0L)]]
- sealed trait Protocol extends Request with Response
- sealed trait ProtocolCodec[A] extends Any
- trait PublishProtocol extends AnyRef
-
sealed
trait
RESP extends Serializable
This sealed trait represents the entire Redis Serialization Protocol algebra
Concrete instances of this trait must be created using this trait's companion object's methods, were scodec.Codecs for each are also defined
- See also
- trait RESPBuilders extends AnyRef
- trait RESPCodecs extends AnyRef
-
trait
RESPParamWrite[A] extends AnyRef
- Annotations
- @implicitNotFound( ... ) @inductive()
-
trait
RESPRead[A] extends AnyRef
- Annotations
- @implicitNotFound( ... )
- final type RangeOffset = Refined[Int, Closed[_0, Int(536870911)]]
-
trait
Read[A, B] extends AnyRef
- Annotations
- @implicitNotFound( ... )
- sealed trait Request extends AnyRef
- sealed trait Response extends AnyRef
- final case class Scan[A](cursor: NonNegLong, values: Option[Seq[A]]) extends Product with Serializable
- final case class ScanKV(cursor: NonNegLong, maybeValues: Option[Seq[KeyValue[NonEmptyString, String]]]) extends Product with Serializable
- trait ServerProtocol extends AnyRef
- trait SetProtocol extends AnyRef
- trait SetProtocolExtra extends AnyRef
-
trait
Show[A] extends AnyRef
- Annotations
- @implicitNotFound( ... )
-
sealed abstract
class
SimpleString extends RESP
RESP Simple Strings
RESP Simple Strings
These can be constructed by using the RESPBuilders#str method
import laserdisc.protocol.RESP._ val simpleString: SimpleString = str("some string")
- Note
Sometimes the value "OK" is used to represent a successful acknowledgement/processing of a command. This is represented using the
final val
RESPBuilders.ok
Example: - trait SortedSetProtocol extends AnyRef
- trait SortedSetProtocolExtra extends AnyRef
- final type StringLength = Refined[Long, Closed[_0, Long(4294967295L)]]
- trait StringProtocol extends AnyRef
- trait StringProtocolExtra extends AnyRef
- final case class Time(timestamp: NonNegLong, elapsedMicroseconds: NonNegLong) extends Product with Serializable
-
sealed
trait
UnzipAndInsert[L <: HList, A] extends DepFn2[L, A] with Serializable
This type-class serves two purposes:
This type-class serves two purposes:
- as a witness of the ability for a HList to be unzipped (iff made of Tuple2/pairs)
- as a higher-ranked function that allows the caller to invoke it (using an instance of the HList and an instance of some type A that needs to be inserted) to unzip the HList into exactly two HList and then concatenate these two after having inserted between them that instance of A.
- L
- A
The type we want to insert before concatenation
- Annotations
- @implicitNotFound( ... )
Value Members
- final val NonEmptyString: eu.timepit.refined.types.string.NonEmptyString.type
- implicit final val nanValidator: Plain[scala.Double, NaN]
- object AtLeastN extends Serializable
- object ConnectionName extends RefinedTypeOps[ConnectionName, String]
- object ConnectionProtocol
- object DbIndex extends RefinedTypeOps[DbIndex, Int]
- object Double extends RefinedTypeOps[Double, scala.Double]
- object Error extends Serializable
- object GlobPattern extends RefinedTypeOps[GlobPattern, String]
- object Index extends RefinedTypeOps[Index, Long]
- object Integer extends Serializable
- object KeyProtocol
- object ListProtocol
- object NilArray extends NilArray with Product with Serializable
- object NonNegInt extends RefinedTypeOps[NonNegInt, Int]
- object NonNegLong extends RefinedTypeOps[NonNegLong, Long]
- object NonNilArray extends Serializable
- object NonNullBulkString extends Serializable
- object NonZeroDouble extends RefinedTypeOps[NonZeroDouble, scala.Double]
- object NonZeroInt extends RefinedTypeOps[NonZeroInt, Int]
- object NonZeroLong extends RefinedTypeOps[NonZeroLong, Long]
- object NullBulkString extends NullBulkString with Product with Serializable
- object OK extends OK with Product with Serializable
- object PosInt extends RefinedTypeOps[PosInt, Int]
- object PosLong extends RefinedTypeOps[PosLong, Long]
- object Protocol
- object RESP extends RESPBuilders with RESPCodecs with Serializable
- object RESPParamWrite extends LowPriorityRESPParamWrite
- object RESPRead
- object RangeOffset extends RefinedTypeOps[RangeOffset, Int]
- object Read extends LowPriorityReadInstances
- object SafeDouble
- object SafeInt
- object SafeLong
- object ServerProtocol
- object Show extends LowPriorityShowInstances
- object SimpleString extends Serializable
- object SortedSetProtocol
- object StringLength extends RefinedTypeOps[StringLength, Long]
- object StringProtocol
- object UnzipAndInsert extends Serializable
- object syntax