xyz.stratalab.indexer.services.BlockServiceGrpc.scala Maven / Gradle / Ivy
The newest version!
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3
package xyz.stratalab.indexer.services
object BlockServiceGrpc {
val METHOD_GET_BLOCK_BY_ID: _root_.io.grpc.MethodDescriptor[xyz.stratalab.indexer.services.GetBlockByIdRequest, xyz.stratalab.indexer.services.BlockResponse] =
_root_.io.grpc.MethodDescriptor.newBuilder()
.setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("xyz.stratalab.indexer.services.BlockService", "getBlockById"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[xyz.stratalab.indexer.services.GetBlockByIdRequest])
.setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[xyz.stratalab.indexer.services.BlockResponse])
.setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(xyz.stratalab.indexer.services.IndexerRpcProto.javaDescriptor.getServices().get(0).getMethods().get(0)))
.build()
val METHOD_GET_BLOCK_BY_HEIGHT: _root_.io.grpc.MethodDescriptor[xyz.stratalab.indexer.services.GetBlockByHeightRequest, xyz.stratalab.indexer.services.BlockResponse] =
_root_.io.grpc.MethodDescriptor.newBuilder()
.setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("xyz.stratalab.indexer.services.BlockService", "getBlockByHeight"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[xyz.stratalab.indexer.services.GetBlockByHeightRequest])
.setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[xyz.stratalab.indexer.services.BlockResponse])
.setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(xyz.stratalab.indexer.services.IndexerRpcProto.javaDescriptor.getServices().get(0).getMethods().get(1)))
.build()
val METHOD_GET_BLOCK_BY_DEPTH: _root_.io.grpc.MethodDescriptor[xyz.stratalab.indexer.services.GetBlockByDepthRequest, xyz.stratalab.indexer.services.BlockResponse] =
_root_.io.grpc.MethodDescriptor.newBuilder()
.setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("xyz.stratalab.indexer.services.BlockService", "getBlockByDepth"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[xyz.stratalab.indexer.services.GetBlockByDepthRequest])
.setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[xyz.stratalab.indexer.services.BlockResponse])
.setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(xyz.stratalab.indexer.services.IndexerRpcProto.javaDescriptor.getServices().get(0).getMethods().get(2)))
.build()
val SERVICE: _root_.io.grpc.ServiceDescriptor =
_root_.io.grpc.ServiceDescriptor.newBuilder("xyz.stratalab.indexer.services.BlockService")
.setSchemaDescriptor(new _root_.scalapb.grpc.ConcreteProtoFileDescriptorSupplier(xyz.stratalab.indexer.services.IndexerRpcProto.javaDescriptor))
.addMethod(METHOD_GET_BLOCK_BY_ID)
.addMethod(METHOD_GET_BLOCK_BY_HEIGHT)
.addMethod(METHOD_GET_BLOCK_BY_DEPTH)
.build()
/** Operations related to blocks
*/
trait BlockService extends _root_.scalapb.grpc.AbstractService {
override def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[BlockService] = BlockService
/** Retrieve a block with the specified `id` from the configured indexer service. This returns its result when there is a
* block present in the indexer service with the specified id and the confidence factor of the block is greater than or
* equal to the value of the `confidenceFactor` parameter.
*/
def getBlockById(request: xyz.stratalab.indexer.services.GetBlockByIdRequest): scala.concurrent.Future[xyz.stratalab.indexer.services.BlockResponse]
/** Retrieve the block at the specified height from the configured indexer service, where the height of the genesis block
* is 1. This returns a result when there is a block present in the indexer service at the specified height and the
* confidence factor of the block is greater than or equal to the value of the `confidenceFactor` parameter.
*/
def getBlockByHeight(request: xyz.stratalab.indexer.services.GetBlockByHeightRequest): scala.concurrent.Future[xyz.stratalab.indexer.services.BlockResponse]
/** Retrieve the block at the specified depth from the configured indexer service. This returns its result immediately.
* The block at depth 1 is the highest block with a confidence factor that is greater than or
* equal to the value of the `confidenceFactor` parameter.
*
* Since blocks keep getting added, we expect that multiple calls to this with the same argument will return different blocks.
*/
def getBlockByDepth(request: xyz.stratalab.indexer.services.GetBlockByDepthRequest): scala.concurrent.Future[xyz.stratalab.indexer.services.BlockResponse]
}
object BlockService extends _root_.scalapb.grpc.ServiceCompanion[BlockService] {
implicit def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[BlockService] = this
def javaDescriptor: _root_.com.google.protobuf.Descriptors.ServiceDescriptor = xyz.stratalab.indexer.services.IndexerRpcProto.javaDescriptor.getServices().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.ServiceDescriptor = xyz.stratalab.indexer.services.IndexerRpcProto.scalaDescriptor.services(0)
def bindService(serviceImpl: BlockService, executionContext: scala.concurrent.ExecutionContext): _root_.io.grpc.ServerServiceDefinition =
_root_.io.grpc.ServerServiceDefinition.builder(SERVICE)
.addMethod(
METHOD_GET_BLOCK_BY_ID,
_root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: xyz.stratalab.indexer.services.GetBlockByIdRequest, observer: _root_.io.grpc.stub.StreamObserver[xyz.stratalab.indexer.services.BlockResponse]) => {
serviceImpl.getBlockById(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))(
executionContext)
}))
.addMethod(
METHOD_GET_BLOCK_BY_HEIGHT,
_root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: xyz.stratalab.indexer.services.GetBlockByHeightRequest, observer: _root_.io.grpc.stub.StreamObserver[xyz.stratalab.indexer.services.BlockResponse]) => {
serviceImpl.getBlockByHeight(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))(
executionContext)
}))
.addMethod(
METHOD_GET_BLOCK_BY_DEPTH,
_root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: xyz.stratalab.indexer.services.GetBlockByDepthRequest, observer: _root_.io.grpc.stub.StreamObserver[xyz.stratalab.indexer.services.BlockResponse]) => {
serviceImpl.getBlockByDepth(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))(
executionContext)
}))
.build()
}
/** Operations related to blocks
*/
trait BlockServiceBlockingClient {
def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[BlockService] = BlockService
/** Retrieve a block with the specified `id` from the configured indexer service. This returns its result when there is a
* block present in the indexer service with the specified id and the confidence factor of the block is greater than or
* equal to the value of the `confidenceFactor` parameter.
*/
def getBlockById(request: xyz.stratalab.indexer.services.GetBlockByIdRequest): xyz.stratalab.indexer.services.BlockResponse
/** Retrieve the block at the specified height from the configured indexer service, where the height of the genesis block
* is 1. This returns a result when there is a block present in the indexer service at the specified height and the
* confidence factor of the block is greater than or equal to the value of the `confidenceFactor` parameter.
*/
def getBlockByHeight(request: xyz.stratalab.indexer.services.GetBlockByHeightRequest): xyz.stratalab.indexer.services.BlockResponse
/** Retrieve the block at the specified depth from the configured indexer service. This returns its result immediately.
* The block at depth 1 is the highest block with a confidence factor that is greater than or
* equal to the value of the `confidenceFactor` parameter.
*
* Since blocks keep getting added, we expect that multiple calls to this with the same argument will return different blocks.
*/
def getBlockByDepth(request: xyz.stratalab.indexer.services.GetBlockByDepthRequest): xyz.stratalab.indexer.services.BlockResponse
}
class BlockServiceBlockingStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT) extends _root_.io.grpc.stub.AbstractStub[BlockServiceBlockingStub](channel, options) with BlockServiceBlockingClient {
/** Retrieve a block with the specified `id` from the configured indexer service. This returns its result when there is a
* block present in the indexer service with the specified id and the confidence factor of the block is greater than or
* equal to the value of the `confidenceFactor` parameter.
*/
override def getBlockById(request: xyz.stratalab.indexer.services.GetBlockByIdRequest): xyz.stratalab.indexer.services.BlockResponse = {
_root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_GET_BLOCK_BY_ID, options, request)
}
/** Retrieve the block at the specified height from the configured indexer service, where the height of the genesis block
* is 1. This returns a result when there is a block present in the indexer service at the specified height and the
* confidence factor of the block is greater than or equal to the value of the `confidenceFactor` parameter.
*/
override def getBlockByHeight(request: xyz.stratalab.indexer.services.GetBlockByHeightRequest): xyz.stratalab.indexer.services.BlockResponse = {
_root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_GET_BLOCK_BY_HEIGHT, options, request)
}
/** Retrieve the block at the specified depth from the configured indexer service. This returns its result immediately.
* The block at depth 1 is the highest block with a confidence factor that is greater than or
* equal to the value of the `confidenceFactor` parameter.
*
* Since blocks keep getting added, we expect that multiple calls to this with the same argument will return different blocks.
*/
override def getBlockByDepth(request: xyz.stratalab.indexer.services.GetBlockByDepthRequest): xyz.stratalab.indexer.services.BlockResponse = {
_root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_GET_BLOCK_BY_DEPTH, options, request)
}
override def build(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): BlockServiceBlockingStub = new BlockServiceBlockingStub(channel, options)
}
class BlockServiceStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT) extends _root_.io.grpc.stub.AbstractStub[BlockServiceStub](channel, options) with BlockService {
/** Retrieve a block with the specified `id` from the configured indexer service. This returns its result when there is a
* block present in the indexer service with the specified id and the confidence factor of the block is greater than or
* equal to the value of the `confidenceFactor` parameter.
*/
override def getBlockById(request: xyz.stratalab.indexer.services.GetBlockByIdRequest): scala.concurrent.Future[xyz.stratalab.indexer.services.BlockResponse] = {
_root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_GET_BLOCK_BY_ID, options, request)
}
/** Retrieve the block at the specified height from the configured indexer service, where the height of the genesis block
* is 1. This returns a result when there is a block present in the indexer service at the specified height and the
* confidence factor of the block is greater than or equal to the value of the `confidenceFactor` parameter.
*/
override def getBlockByHeight(request: xyz.stratalab.indexer.services.GetBlockByHeightRequest): scala.concurrent.Future[xyz.stratalab.indexer.services.BlockResponse] = {
_root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_GET_BLOCK_BY_HEIGHT, options, request)
}
/** Retrieve the block at the specified depth from the configured indexer service. This returns its result immediately.
* The block at depth 1 is the highest block with a confidence factor that is greater than or
* equal to the value of the `confidenceFactor` parameter.
*
* Since blocks keep getting added, we expect that multiple calls to this with the same argument will return different blocks.
*/
override def getBlockByDepth(request: xyz.stratalab.indexer.services.GetBlockByDepthRequest): scala.concurrent.Future[xyz.stratalab.indexer.services.BlockResponse] = {
_root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_GET_BLOCK_BY_DEPTH, options, request)
}
override def build(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): BlockServiceStub = new BlockServiceStub(channel, options)
}
object BlockServiceStub extends _root_.io.grpc.stub.AbstractStub.StubFactory[BlockServiceStub] {
override def newStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): BlockServiceStub = new BlockServiceStub(channel, options)
implicit val stubFactory: _root_.io.grpc.stub.AbstractStub.StubFactory[BlockServiceStub] = this
}
def bindService(serviceImpl: BlockService, executionContext: scala.concurrent.ExecutionContext): _root_.io.grpc.ServerServiceDefinition = BlockService.bindService(serviceImpl, executionContext)
def blockingStub(channel: _root_.io.grpc.Channel): BlockServiceBlockingStub = new BlockServiceBlockingStub(channel)
def stub(channel: _root_.io.grpc.Channel): BlockServiceStub = new BlockServiceStub(channel)
def javaDescriptor: _root_.com.google.protobuf.Descriptors.ServiceDescriptor = xyz.stratalab.indexer.services.IndexerRpcProto.javaDescriptor.getServices().get(0)
}