package grpc
- Alphabetic
- Public
- Protected
Package Members
- package ratelimiting
Type Members
- abstract class ActiveStreamCounterInterceptor extends ServerInterceptor
- class ApiRequestLogger extends ApiRequestLoggerBase with ServerInterceptor with NamedLogging
Server side interceptor that logs incoming and outgoing traffic.
- class ApiRequestLoggerBase extends NamedLogging
Base class for building gRPC API request loggers.
Base class for building gRPC API request loggers. Used in Canton network to build a client-side gRPC API request logger in addition to the server-side one.
See https://github.com/DACH-NY/the-real-canton-coin/blob/bea9ccff84e72957aa7ac57ae3d1a00bc6d368d0/canton/community/common/src/main/scala/com/digitalasset/canton/networking/grpc/ApiClientRequestLogger.scala#L16
- Annotations
- @SuppressWarnings()
- class CantonCommunityServerInterceptors extends CantonServerInterceptors
- trait CantonMutableHandlerRegistry extends AutoCloseable
- trait CantonServerBuilder extends AnyRef
The io.grpc.ServerBuilder is pretty "loose" with its type parameters causing some issues for
scalac
and IntelliJ.The io.grpc.ServerBuilder is pretty "loose" with its type parameters causing some issues for
scalac
and IntelliJ. Here we provide a wrapper hiding these type issues. - trait CantonServerInterceptors extends AnyRef
- class ClientChannelBuilder extends NamedLogging
Construct a GRPC channel to be used by a client within canton.
- abstract class ErrorLoggingStreamObserver[R] extends StreamObserver[R]
- class ForwardingStreamObserver[A, B] extends StreamObserver[A]
Stream observer that will forward all received values, errors and completions to another observer, mapping values to a different type.
- final class GrpcClient[Svc <: AbstractStub[Svc]] extends AnyRef
Bundles a service stub together with the channel it is using
- class GrpcDynamicService extends NamedLogging
Stand up a gRPC service stub which will direct to an instance set dynamically at runtime if available, or return a UNAVAILBLE status if not set.
Stand up a gRPC service stub which will direct to an instance set dynamically at runtime if available, or return a UNAVAILBLE status if not set.
Use setInstance and clear to update the backing service instance.
There will be a performance penalty as the method on the backing service is looked up on each call, however this is likely fine for services that are rarely used like admin commands.
Currently intentionally works with typeless io.grpc.ServiceDescriptor instances to allow use with stubs generated by StaticGrpcServices. Validation could be added to ensure full names of services and methods match.
- sealed trait GrpcError extends AnyRef
- final case class GrpcManagedChannel(name: String, channel: ManagedChannel, associatedHasRunOnClosing: HasRunOnClosing, logger: TracedLogger) extends AutoCloseable with OnShutdownRunner with Product with Serializable
Bundles a gRPC managed channel together with the shutdown runner of the component the channel belongs to
- class GrpcManagedChannelHandle extends AnyRef
- final class ManagedChannelBuilderProxy extends AnyVal
Proxy for a io.grpc.ManagedChannelBuilder with unknown type argument type
Proxy for a io.grpc.ManagedChannelBuilder with unknown type argument type
Hides the wildcard type argument to
ManagedChannelBuilder
so that type inference will not infer the more correct argumentA forSome { type A <: ManagedChannelBuilder[A] }
, which is an existential type that cannot be expressed by wildcards. This works only because Scala does not check the bounds of wildcard type arguments.See https://stackoverflow.com/a/5520212 for some background on existential types
- class MultiHostNameResolver extends NameResolver
A NameResolver that will perform DNS lookup for each of the provided hosts and aggregate the results into a single resolution result.
- class MultiHostNameResolverProvider extends NameResolverProvider
- class RecordingStreamObserver[RespT] extends StreamObserver[RespT]
Stream observer that records all incoming events.
Value Members
- object CantonGrpcUtil
- object CantonServerBuilder
- object ClientChannelBuilder
- object GrpcClient
- object GrpcError
- object ManagedChannelBuilderProxy
- object MultiHostNameResolverProvider
- object StaticGrpcServices
Stubbed GRPC services to provide simple responses rather than a typical full implementation.