com.bilalfazlani.zioMaelstrom

Members list

Type members

Classlikes

case class Context(me: NodeId, others: Set[NodeId])

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Context

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Context.type
case class DecodingFailure(error: String, message: GenericMessage)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed trait InputStream

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class File
object StdIn.type
class Stream
object InputStream

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
trait LinKv

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object LinKv

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
LinKv.type
trait LinTso

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object LinTso

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
LinTso.type
enum LogFormat

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait Logger

Attributes

Supertypes
class Object
trait Matchable
class Any
trait LwwKv

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object LwwKv

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
LwwKv.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
class Object
trait Matchable
class Any
enum NodeLogLevel(val level: Int)

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class PartiallyAppliedKvRead[Kv <: KvService, Value](dummy: Boolean)(implicit evidence$1: Tag[Kv])

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Supertypes
class Object
trait Matchable
class Any
trait SeqKv

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object SeqKv

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
SeqKv.type
case class Settings(logLevel: NodeLogLevel, logFormat: LogFormat, concurrency: Int)

Settings for the node

Settings for the node

Value parameters

concurrency

Concurrency level for processing messages. Default is 1024. This means 1024 request messages (receive api) + 1024 response messages (ask api) = 2048 messages can be processed in parallel.

logFormat

You can choose between colored or plain logs. Default is colored

logLevel

You can log messages using logInfo or logError. Output logs can be filtered by setting this value to either Debug, Info, Warning, Error or Disabled. Default is Info

nodeInput

Input can be taken from stdin or a file. Maelstrom will feed to stdin but when debugging it is easier to use a file. Default is stdin

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class Timeout(messageId: MessageId, remote: NodeId, timeout: Duration)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Types

type Handler[R, I] = (MessageSource, Context) ?=> I => ZIO[MaelstromRuntime & R, Nothing, Unit]

Value members

Concrete methods

def getMyNodeId: ZIO[Initialisation, Nothing, NodeId]
def getOtherNodeIds: ZIO[Initialisation, Nothing, Set[NodeId]]
def logDebug(message: => String): URIO[Logger, Unit]
def logError(message: => String): URIO[Logger, Unit]
def logInfo(message: => String): URIO[Logger, Unit]
def logWarn(message: => String): URIO[Logger, Unit]
def me(using Context): NodeId
def others(using Context): Set[NodeId]
def receive[I]: ReceivePartiallyApplied[I]
def reply[B <: Sendable & Reply : JsonEncoder](out: B)(implicit evidence$2: JsonEncoder[B], MessageSource): URIO[MessageSender, Unit]
def src(using MessageSource): NodeId

Extensions

Extensions

extension (duration: Duration)(duration: Duration)
def renderDetailed: String
extension (nodeId: NodeId)(nodeId: NodeId)
def ask[Res <: Reply]: AskPartiallyApplied[Res]
def send[A <: Sendable : JsonEncoder](body: A)(implicit evidence$1: JsonEncoder[A]): URIO[MessageSender, Unit]
extension (p: Path)(p: Path)
infix def /(string: String): Path
extension (s: String)(s: String)
infix def /(string: String): Path
extension (s: String)(s: String)
def amber: String
def gray: String
def green: String
def red: String
def yellow: String