org.plasmalabs.node.services.NetworkControlRpcGrpc.scala Maven / Gradle / Ivy
The newest version!
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3
package org.plasmalabs.node.services
object NetworkControlRpcGrpc {
val METHOD_GET_HOST_ID: _root_.io.grpc.MethodDescriptor[org.plasmalabs.node.services.GetHostIdReq, org.plasmalabs.node.services.GetHostIdRes] =
_root_.io.grpc.MethodDescriptor.newBuilder()
.setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("org.plasmalabs.node.services.NetworkControlRpc", "GetHostId"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[org.plasmalabs.node.services.GetHostIdReq])
.setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[org.plasmalabs.node.services.GetHostIdRes])
.setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(org.plasmalabs.node.services.NetworkControlProto.javaDescriptor.getServices().get(0).getMethods().get(0)))
.build()
val METHOD_FORGET_PEER: _root_.io.grpc.MethodDescriptor[org.plasmalabs.node.services.ForgetPeerReq, org.plasmalabs.node.services.ForgetPeerRes] =
_root_.io.grpc.MethodDescriptor.newBuilder()
.setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("org.plasmalabs.node.services.NetworkControlRpc", "ForgetPeer"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[org.plasmalabs.node.services.ForgetPeerReq])
.setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[org.plasmalabs.node.services.ForgetPeerRes])
.setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(org.plasmalabs.node.services.NetworkControlProto.javaDescriptor.getServices().get(0).getMethods().get(1)))
.build()
val METHOD_ADD_PEER: _root_.io.grpc.MethodDescriptor[org.plasmalabs.node.services.AddPeerReq, org.plasmalabs.node.services.AddPeerRes] =
_root_.io.grpc.MethodDescriptor.newBuilder()
.setType(_root_.io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(_root_.io.grpc.MethodDescriptor.generateFullMethodName("org.plasmalabs.node.services.NetworkControlRpc", "AddPeer"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[org.plasmalabs.node.services.AddPeerReq])
.setResponseMarshaller(_root_.scalapb.grpc.Marshaller.forMessage[org.plasmalabs.node.services.AddPeerRes])
.setSchemaDescriptor(_root_.scalapb.grpc.ConcreteProtoMethodDescriptorSupplier.fromMethodDescriptor(org.plasmalabs.node.services.NetworkControlProto.javaDescriptor.getServices().get(0).getMethods().get(2)))
.build()
val SERVICE: _root_.io.grpc.ServiceDescriptor =
_root_.io.grpc.ServiceDescriptor.newBuilder("org.plasmalabs.node.services.NetworkControlRpc")
.setSchemaDescriptor(new _root_.scalapb.grpc.ConcreteProtoFileDescriptorSupplier(org.plasmalabs.node.services.NetworkControlProto.javaDescriptor))
.addMethod(METHOD_GET_HOST_ID)
.addMethod(METHOD_FORGET_PEER)
.addMethod(METHOD_ADD_PEER)
.build()
trait NetworkControlRpc extends _root_.scalapb.grpc.AbstractService {
override def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[NetworkControlRpc] = NetworkControlRpc
/** Get current hostId
*/
def getHostId(request: org.plasmalabs.node.services.GetHostIdReq): scala.concurrent.Future[org.plasmalabs.node.services.GetHostIdRes]
/** Instruct the node to forget peer i.e. close connection and remove peer from known hosts
*/
def forgetPeer(request: org.plasmalabs.node.services.ForgetPeerReq): scala.concurrent.Future[org.plasmalabs.node.services.ForgetPeerRes]
/** Add remote peer as known peer, node will node install connection to that peer automatically
*/
def addPeer(request: org.plasmalabs.node.services.AddPeerReq): scala.concurrent.Future[org.plasmalabs.node.services.AddPeerRes]
}
object NetworkControlRpc extends _root_.scalapb.grpc.ServiceCompanion[NetworkControlRpc] {
implicit def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[NetworkControlRpc] = this
def javaDescriptor: _root_.com.google.protobuf.Descriptors.ServiceDescriptor = org.plasmalabs.node.services.NetworkControlProto.javaDescriptor.getServices().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.ServiceDescriptor = org.plasmalabs.node.services.NetworkControlProto.scalaDescriptor.services(0)
def bindService(serviceImpl: NetworkControlRpc, executionContext: scala.concurrent.ExecutionContext): _root_.io.grpc.ServerServiceDefinition =
_root_.io.grpc.ServerServiceDefinition.builder(SERVICE)
.addMethod(
METHOD_GET_HOST_ID,
_root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: org.plasmalabs.node.services.GetHostIdReq, observer: _root_.io.grpc.stub.StreamObserver[org.plasmalabs.node.services.GetHostIdRes]) => {
serviceImpl.getHostId(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))(
executionContext)
}))
.addMethod(
METHOD_FORGET_PEER,
_root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: org.plasmalabs.node.services.ForgetPeerReq, observer: _root_.io.grpc.stub.StreamObserver[org.plasmalabs.node.services.ForgetPeerRes]) => {
serviceImpl.forgetPeer(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))(
executionContext)
}))
.addMethod(
METHOD_ADD_PEER,
_root_.io.grpc.stub.ServerCalls.asyncUnaryCall((request: org.plasmalabs.node.services.AddPeerReq, observer: _root_.io.grpc.stub.StreamObserver[org.plasmalabs.node.services.AddPeerRes]) => {
serviceImpl.addPeer(request).onComplete(scalapb.grpc.Grpc.completeObserver(observer))(
executionContext)
}))
.build()
}
trait NetworkControlRpcBlockingClient {
def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[NetworkControlRpc] = NetworkControlRpc
/** Get current hostId
*/
def getHostId(request: org.plasmalabs.node.services.GetHostIdReq): org.plasmalabs.node.services.GetHostIdRes
/** Instruct the node to forget peer i.e. close connection and remove peer from known hosts
*/
def forgetPeer(request: org.plasmalabs.node.services.ForgetPeerReq): org.plasmalabs.node.services.ForgetPeerRes
/** Add remote peer as known peer, node will node install connection to that peer automatically
*/
def addPeer(request: org.plasmalabs.node.services.AddPeerReq): org.plasmalabs.node.services.AddPeerRes
}
class NetworkControlRpcBlockingStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT) extends _root_.io.grpc.stub.AbstractStub[NetworkControlRpcBlockingStub](channel, options) with NetworkControlRpcBlockingClient {
/** Get current hostId
*/
override def getHostId(request: org.plasmalabs.node.services.GetHostIdReq): org.plasmalabs.node.services.GetHostIdRes = {
_root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_GET_HOST_ID, options, request)
}
/** Instruct the node to forget peer i.e. close connection and remove peer from known hosts
*/
override def forgetPeer(request: org.plasmalabs.node.services.ForgetPeerReq): org.plasmalabs.node.services.ForgetPeerRes = {
_root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_FORGET_PEER, options, request)
}
/** Add remote peer as known peer, node will node install connection to that peer automatically
*/
override def addPeer(request: org.plasmalabs.node.services.AddPeerReq): org.plasmalabs.node.services.AddPeerRes = {
_root_.scalapb.grpc.ClientCalls.blockingUnaryCall(channel, METHOD_ADD_PEER, options, request)
}
override def build(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): NetworkControlRpcBlockingStub = new NetworkControlRpcBlockingStub(channel, options)
}
class NetworkControlRpcStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions = _root_.io.grpc.CallOptions.DEFAULT) extends _root_.io.grpc.stub.AbstractStub[NetworkControlRpcStub](channel, options) with NetworkControlRpc {
/** Get current hostId
*/
override def getHostId(request: org.plasmalabs.node.services.GetHostIdReq): scala.concurrent.Future[org.plasmalabs.node.services.GetHostIdRes] = {
_root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_GET_HOST_ID, options, request)
}
/** Instruct the node to forget peer i.e. close connection and remove peer from known hosts
*/
override def forgetPeer(request: org.plasmalabs.node.services.ForgetPeerReq): scala.concurrent.Future[org.plasmalabs.node.services.ForgetPeerRes] = {
_root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_FORGET_PEER, options, request)
}
/** Add remote peer as known peer, node will node install connection to that peer automatically
*/
override def addPeer(request: org.plasmalabs.node.services.AddPeerReq): scala.concurrent.Future[org.plasmalabs.node.services.AddPeerRes] = {
_root_.scalapb.grpc.ClientCalls.asyncUnaryCall(channel, METHOD_ADD_PEER, options, request)
}
override def build(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): NetworkControlRpcStub = new NetworkControlRpcStub(channel, options)
}
object NetworkControlRpcStub extends _root_.io.grpc.stub.AbstractStub.StubFactory[NetworkControlRpcStub] {
override def newStub(channel: _root_.io.grpc.Channel, options: _root_.io.grpc.CallOptions): NetworkControlRpcStub = new NetworkControlRpcStub(channel, options)
implicit val stubFactory: _root_.io.grpc.stub.AbstractStub.StubFactory[NetworkControlRpcStub] = this
}
def bindService(serviceImpl: NetworkControlRpc, executionContext: scala.concurrent.ExecutionContext): _root_.io.grpc.ServerServiceDefinition = NetworkControlRpc.bindService(serviceImpl, executionContext)
def blockingStub(channel: _root_.io.grpc.Channel): NetworkControlRpcBlockingStub = new NetworkControlRpcBlockingStub(channel)
def stub(channel: _root_.io.grpc.Channel): NetworkControlRpcStub = new NetworkControlRpcStub(channel)
def javaDescriptor: _root_.com.google.protobuf.Descriptors.ServiceDescriptor = org.plasmalabs.node.services.NetworkControlProto.javaDescriptor.getServices().get(0)
}