CommandProtocol

endless.core.protocol.CommandProtocol
See theCommandProtocol companion object
trait CommandProtocol[ID, Alg[_[_]]]

CommandProtocol represents the transport aspects of the entity cluster.

client provides an implementation of the algebra which sends commands for each defined function in the algebra and decodes the reply, and server is a decoder for instances of IncomingCommand[F, Alg] that represent incoming commands that can be run and contain their own reply encoder.

Type parameters

Alg

the entity algebra

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def clientFor[F[_]](id: ID)(implicit sender: CommandSender[F, ID]): Alg[F]

Returns an instance of entity algebra that translates calls into commands, sends them via the CommandSender instance in implicit scope, and decodes the reply (implements an RPC-like client).

Returns an instance of entity algebra that translates calls into commands, sends them via the CommandSender instance in implicit scope, and decodes the reply (implements an RPC-like client).

Attributes

def server[F[_]]: Decoder[IncomingCommand[F, Alg]]

Decoder for IncomingCommand[F, Alg] which can run the command and encode the reply

Decoder for IncomingCommand[F, Alg] which can run the command and encode the reply

Type parameters

F

context

Attributes