object CantonGrpcUtil

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

Type Members

  1. implicit final class GrpcETFUSExtended[A] extends AnyVal
  2. implicit final class GrpcFUSExtended[A] extends AnyVal
  3. trait GrpcLogPolicy extends AnyRef
  4. implicit final class GrpcUSExtended[A] extends AnyVal

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def bidirectionalStreamingRequest[Svc <: AbstractStub[Svc], F[_], HasObserver, Req, Resp](client: GrpcClient[Svc], observerFactory: (CancellableContext, HasRunOnClosing) => F[HasObserver])(getObserver: (HasObserver) => StreamObserver[Resp])(send: (Svc, StreamObserver[Resp]) => StreamObserver[Req])(implicit traceContext: TraceContext, F: Functor[F]): F[(HasObserver, StreamObserver[Req])]

    Makes the bidirectional-streaming call via send on the client in a fresh cancellable gRPC io.grpc.Context that is used to construct the stream observer via the observerFactory.

    Makes the bidirectional-streaming call via send on the client in a fresh cancellable gRPC io.grpc.Context that is used to construct the stream observer via the observerFactory.

    F

    The effect type of the observer factory.

    observerFactory

    Factory to create the stream observer for handling the message stream from the server.

    getObserver

    Extracts the actual stream observer from the HasObserver instance.

    Annotations
    @GrpcServiceInvocationMethod()
  6. def checkCantonApiInfo(serverName: String, expectedName: String, channelBuilder: ManagedChannelBuilderProxy, logger: TracedLogger, timeout: NonNegativeDuration, hasRunOnClosing: HasRunOnClosing, token: Option[String])(implicit ec: ExecutionContext, traceContext: TraceContext): EitherT[FutureUnlessShutdown, String, Unit]
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. def mapErrNew[T <: RpcError, C](value: EitherT[Future, T, C])(implicit ec: ExecutionContext): Future[C]
  14. def mapErrNew[T <: RpcError, C](value: Either[T, C])(implicit ec: ExecutionContext): EitherT[Future, StatusRuntimeException, C]
  15. def mapErrNewETUS[T <: RpcError, C](value: EitherT[FutureUnlessShutdown, T, C])(implicit ec: ExecutionContext, errorLoggingContext: ErrorLoggingContext): EitherT[Future, StatusRuntimeException, C]
  16. def mapErrNewEUS[T <: RpcError, C](value: EitherT[FutureUnlessShutdown, T, C])(implicit ec: ExecutionContext, errorLoggingContext: ErrorLoggingContext): Future[C]
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  20. def sendGrpcRequest[Svc <: AbstractStub[Svc], Res](client: GrpcClient[Svc], serverName: String)(send: (Svc) => Future[Res], requestDescription: String, timeout: Duration, logger: TracedLogger, logPolicy: GrpcLogPolicy = DefaultGrpcLogPolicy, retryPolicy: (GrpcError) => Boolean = _.retry)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, GrpcError, Res]

    Wrapper method for sending a Grpc request.

    Wrapper method for sending a Grpc request. Takes care of appropriate logging and retrying.

    NOTE that this will NOT WORK for requests with streamed responses, as such requests will report errors to the corresponding io.grpc.stub.StreamObserver. You need to do error handling within the corresponding io.grpc.stub.StreamObserver.

    client

    the Grpc client used to send the request

    serverName

    used for logging

    send

    the client method for sending the request

    requestDescription

    used for logging

    timeout

    determines how long to retry or wait for a response. Will retry until 70% of this timeout has elapsed. Will wait for a response until this timeout has elapsed.

    logPolicy

    use this to configure log levels for errors

    retryPolicy

    invoked after an error to determine whether to retry

    Annotations
    @GrpcServiceInvocationMethod()
  21. def sendGrpcRequestUnsafe[Svc <: AbstractStub[Svc], Resp](service: Svc)(send: (Svc) => Future[Resp])(implicit traceContext: TraceContext): Future[Resp]

    Performs send once on service after having set the trace context in gRPC context.

    Performs send once on service after having set the trace context in gRPC context. Does not perform any error handling.

    Prefer sendGrpcRequest whenever possible

    Annotations
    @GrpcServiceInvocationMethod()
  22. def sendSingleGrpcRequest[Svc <: AbstractStub[Svc], Res](serverName: String, requestDescription: String, channelBuilder: ManagedChannelBuilderProxy, stubFactory: (Channel) => Svc, timeout: Duration, logger: TracedLogger, hasRunOnClosing: HasRunOnClosing, logPolicy: GrpcLogPolicy = DefaultGrpcLogPolicy, retryPolicy: (GrpcError) => Boolean, token: Option[String])(send: (Svc) => Future[Res])(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, GrpcError, Res]

    Method to create a grpc channel and send a single request

    Method to create a grpc channel and send a single request

    Based on sendGrpcRequest

    Annotations
    @GrpcServiceInvocationMethod()
  23. val sequencerHealthCheckServiceName: String

    The name of the service that is associated with the sequencer servers' health status.

    The name of the service that is associated with the sequencer servers' health status. This name can have no relation with the gRPC services that the server is running with, and can be anything as long as the client and servers use the same value.

  24. def serverStreamingRequest[Svc <: AbstractStub[Svc], HasObserver, Resp](client: GrpcClient[Svc], observerFactory: (CancellableContext, HasRunOnClosing) => HasObserver)(getObserver: (HasObserver) => StreamObserver[Resp])(send: (Svc, StreamObserver[Resp]) => Unit)(implicit traceContext: TraceContext): HasObserver

    Makes the server-streaming call via send on the client in a fresh cancellable gRPC io.grpc.Context that is used to construct the stream observer via the observerFactory.

    Makes the server-streaming call via send on the client in a fresh cancellable gRPC io.grpc.Context that is used to construct the stream observer via the observerFactory.

    observerFactory

    Factory to create the stream observer for handling the message stream from the server.

    getObserver

    Extracts the actual stream observer from the HasObserver instance.

  25. def shutdownAsGrpcError[C](value: FutureUnlessShutdown[C])(implicit ec: ExecutionContext, errorLoggingContext: ErrorLoggingContext): Future[C]
  26. def shutdownAsGrpcErrorE[A, B](value: EitherT[FutureUnlessShutdown, A, B])(implicit ec: ExecutionContext, errorLoggingContext: ErrorLoggingContext): EitherT[Future, A, B]
  27. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  28. def toString(): String
    Definition Classes
    AnyRef → Any
  29. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  30. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  31. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  32. def wrapErrUS[T](value: EitherT[FutureUnlessShutdown, ProtoDeserializationError, T])(implicit loggingContext: ErrorLoggingContext, ec: ExecutionContext): EitherT[FutureUnlessShutdown, RpcError, T]
  33. def wrapErrUS[T](value: ParsingResult[T])(implicit loggingContext: ErrorLoggingContext, ec: ExecutionContext): EitherT[FutureUnlessShutdown, RpcError, T]
  34. object ApiName
  35. object DefaultGrpcLogPolicy extends GrpcLogPolicy
  36. object GrpcErrors extends GrpcErrorGroup
  37. object RetryPolicy
  38. object SilentLogPolicy extends GrpcLogPolicy

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from AnyRef

Inherited from Any

Ungrouped