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

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 clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  10. def invalidArgument(err: String): StatusRuntimeException
    Annotations
    @Deprecated
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. def mapErr[T, C](value: EitherT[Future, T, C])(implicit ec: ExecutionContext): EitherT[Future, StatusRuntimeException, C]
    Annotations
    @Deprecated
  13. def mapErr[T, C](value: Either[T, C])(implicit ec: ExecutionContext): EitherT[Future, StatusRuntimeException, C]
    Annotations
    @Deprecated
  14. def mapErrNew[T <: CantonError, C](value: EitherT[Future, T, C])(implicit ec: ExecutionContext): EitherT[Future, StatusRuntimeException, C]
  15. def mapErrNew[T <: CantonError, C](value: Either[T, C])(implicit ec: ExecutionContext): EitherT[Future, StatusRuntimeException, C]
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. def neverRetry(_error: GrpcError): Boolean

    A retry policy for never retrying

  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  20. def retryUnlessClosing(closing: () => Boolean)(error: GrpcError): Boolean
  21. def sendGrpcRequest[Svc <: AbstractStub[Svc], Res](client: Svc, serverName: String)(send: (Svc) => Future[Res], requestDescription: String, timeout: Duration, logger: TracedLogger, logPolicy: (GrpcError) => (TracedLogger) => (TraceContext) => Unit = err => logger => traceContext => err.log(logger)(traceContext), retryPolicy: (GrpcError) => Boolean = _.retry)(implicit traceContext: TraceContext): EitherT[Future, 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

  22. def sendSingleGrpcRequest[Svc <: AbstractStub[Svc], Res](serverName: String, requestDescription: String, channel: ManagedChannel, stubFactory: (Channel) => Svc, timeout: Duration, logger: TracedLogger, logPolicy: (GrpcError) => (TracedLogger) => (TraceContext) => Unit = err => logger => traceContext => err.log(logger)(traceContext), retryPolicy: (GrpcError) => Boolean = _.retry)(send: (Svc) => Future[Res])(implicit traceContext: TraceContext): EitherT[Future, 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

  23. def silentLogPolicy(error: GrpcError)(logger: TracedLogger)(traceContext: TraceContext): Unit
  24. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  25. def toString(): String
    Definition Classes
    AnyRef → Any
  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  28. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  29. def wrapErr[T](value: EitherT[Future, ProtoDeserializationError, T])(implicit loggingContext: ErrorLoggingContext, ec: ExecutionContext): EitherT[Future, CantonError, T]
  30. def wrapErr[T](value: ParsingResult[T])(implicit loggingContext: ErrorLoggingContext, ec: ExecutionContext): EitherT[Future, CantonError, T]
  31. object RetryPolicy

Deprecated Value Members

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

Inherited from AnyRef

Inherited from Any

Ungrouped