p

remotely

package remotely

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. remotely
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class BreakerState (halfOpen: Boolean = false, errors: Int = 0, openTime: Option[Long] = None) extends Product with Serializable
  2. case class Capabilities (capabilities: Set[String]) extends Product with Serializable

    A Set of capabilities that a server possesses.

    A Set of capabilities that a server possesses.

    this set of capabilities will be transmitted from Server to client at the time when a connection is built.

    Currently there is only one known capability, which is the "Remotely 1.0" capability.

    You can see this if you telnet to a running remotely server:

    $ telnet localhost 9999
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    OK: [Remotely 1.0]

    The OK line spit out by the server contains a comma separated list of capabilities between the square brackets.

    In the future we might revision our wire format, perhaps because we want to also allow for XML serialization of objects. Perhaps we want to add STARTTLS support, perhaps we want to add a way to fetch documentation for the functions exported by this server, someday in the future, a remotely server might respond with:

    OK: [Remotely 1.0, STARTTLS, Remotely XML 1.0, Remotely 2.0]

    When the client receives this string as part of the connection negotiation, it can perhaps adapt its behavior depending on the server capabilities, or it could decide not to talk to this server.

  3. class CircuitBreaker extends AnyRef
  4. case class Codecs (codecs: Map[String, Codec[Any]]) extends Product with Serializable
  5. case class Endpoint (connections: Process[Task, Handler]) extends Product with Serializable

    A 'logical' endpoint for some service, represented by a possibly rotating stream of Transports.

  6. case class Environment (codecs: Codecs, values: Values) extends Product with Serializable

    A collection of codecs and values, which can be populated and then served over RPC.

    A collection of codecs and values, which can be populated and then served over RPC.

    Example:

    val env: Environment = Environment.empty
      .codec[Int]
      .codec[List[Int]]
      .populate { _
         .declareStrict[List[Int] => Int]("sum", _.sum)
         .declare("fac", (n: Int) => Task { (1 to n).product })
      }
    val stopper = env.serve(new InetSocketAddress("localhost",8080))
    ///
    stopper() // shutdown the server
  7. case class Field [+A](name: String, typeString: String) extends Product with Serializable
  8. macro class GenClient extends Annotation with StaticAnnotation

    Macro annotation that generates a client.

    Macro annotation that generates a client. Usage: @GenClient(remotely.Protocol.empty) object MyClient

    Annotations
    @compileTimeOnly( ... )
  9. macro class GenServer extends Annotation with StaticAnnotation

    Macro annotation that generates a server interface.

    Macro annotation that generates a server interface. Usage: @GenServer(remotely.Protocol.empty) abstract class MyServer

    Annotations
    @compileTimeOnly( ... )
  10. type Handler = (Process[Task, BitVector]) ⇒ Process[Task, BitVector]

    Represents the logic of a connection handler, a function from a stream of bytes to a stream of bytes, which will be sent back to the client.

    Represents the logic of a connection handler, a function from a stream of bytes to a stream of bytes, which will be sent back to the client. The connection will be closed when the returned stream terminates.

    NB: This type cannot represent certain kinds of 'coroutine' client/server interactions, where the server awaits a response to a particular packet sent before continuing.

  11. sealed abstract class IORef [A] extends AnyRef

    An atomically updatable reference, guarded by the Task monad.

  12. trait MacrosCompatibility extends AnyRef
  13. trait Monitoring extends AnyRef

    A collection of callbacks that can be passed to remotely.Environment#serve to gather statistics about a running RPC server.

  14. case class Protocol (codecs: Codecs, signatures: Signatures) extends Product with Serializable
  15. sealed trait Remote [+A] extends AnyRef

    Represents a remote computation which yields a value of type A.

    Represents a remote computation which yields a value of type A. Remote expressions can be serialized and sent to a server for evaluation.

  16. sealed trait Response [+A] extends AnyRef

    The result type for a remote computation.

  17. case class ServerException (msg: String) extends Exception with Product with Serializable

    An exception raised on the server which is returned to the client to be reraised.

  18. case class Signature (name: String, params: List[Field[Any]], outType: String) extends Product with Serializable
  19. case class Signatures (signatures: Set[Signature]) extends Product with Serializable
  20. case class SslParameters (caBundle: Option[File], certFile: Option[File], keyFile: Option[File], keyPassword: Option[String], enabledCiphers: Option[List[String]], enabledProtocols: Option[List[String]], requireClientAuth: Boolean) extends Product with Serializable
  21. case class Type [+A] extends Product with Serializable
  22. trait Value extends AnyRef
  23. case class Values (values: Map[String, Value]) extends Product with Serializable

Value Members

  1. def evaluate[A](e: Endpoint, M: Monitoring = Monitoring.empty)(r: Remote[A])(implicit arg0: Codec[A], arg1: scala.reflect.api.JavaUniverse.TypeTag[A]): Response[A]

    Evaluate the given remote expression at the specified endpoint, and get back the result.

    Evaluate the given remote expression at the specified endpoint, and get back the result. This function is completely pure - no network activity occurs until the returned Response is run.

    The Monitoring instance is notified of each request.

  2. object Capabilities extends RegexParsers with Serializable
  3. object CircuitBreaker
  4. object CircuitBreakerOpen extends Exception with Product with Serializable
  5. object Codecs extends Serializable
  6. object Endpoint extends Serializable
  7. object Environment extends Serializable
  8. object Field extends Serializable
  9. object GenClient extends MacrosCompatibility
  10. object GenServer extends MacrosCompatibility
  11. object IORef
  12. object Monitoring
  13. object Protocol extends Serializable
  14. object Remote
  15. object Response
  16. object SSL
  17. object Server
  18. object Signature extends Serializable
  19. object Signatures extends Serializable
  20. object SslParameters extends Serializable
  21. object Type extends Serializable
  22. object Value
  23. object Values extends Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped