# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc import dcache_py.dcache_pb2 as dcache__pb2 class DcacheServiceStub(object): """Missing associated documentation comment in .proto file.""" def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. """ self.AddCaptcha = channel.unary_unary( '/dcache.DcacheService/AddCaptcha', request_serializer=dcache__pb2.AddCaptchaRequest.SerializeToString, response_deserializer=dcache__pb2.RaftReply.FromString, ) self.AddVisitor = channel.unary_unary( '/dcache.DcacheService/AddVisitor', request_serializer=dcache__pb2.CaptchaID.SerializeToString, response_deserializer=dcache__pb2.OptionAddVisitorResult.FromString, ) self.RenameCaptcha = channel.unary_unary( '/dcache.DcacheService/RenameCaptcha', request_serializer=dcache__pb2.RenameCaptchaRequest.SerializeToString, response_deserializer=dcache__pb2.RaftReply.FromString, ) self.RemoveCaptcha = channel.unary_unary( '/dcache.DcacheService/RemoveCaptcha', request_serializer=dcache__pb2.CaptchaID.SerializeToString, response_deserializer=dcache__pb2.RaftReply.FromString, ) self.CachePow = channel.unary_unary( '/dcache.DcacheService/CachePow', request_serializer=dcache__pb2.CachePowRequest.SerializeToString, response_deserializer=dcache__pb2.RaftReply.FromString, ) self.CacheResult = channel.unary_unary( '/dcache.DcacheService/CacheResult', request_serializer=dcache__pb2.CacheResultRequest.SerializeToString, response_deserializer=dcache__pb2.RaftReply.FromString, ) self.AddLearner = channel.unary_unary( '/dcache.DcacheService/AddLearner', request_serializer=dcache__pb2.Learner.SerializeToString, response_deserializer=dcache__pb2.RaftReply.FromString, ) self.Write = channel.unary_unary( '/dcache.DcacheService/Write', request_serializer=dcache__pb2.RaftRequest.SerializeToString, response_deserializer=dcache__pb2.RaftReply.FromString, ) self.Forward = channel.unary_unary( '/dcache.DcacheService/Forward', request_serializer=dcache__pb2.RaftRequest.SerializeToString, response_deserializer=dcache__pb2.RaftReply.FromString, ) self.AppendEntries = channel.unary_unary( '/dcache.DcacheService/AppendEntries', request_serializer=dcache__pb2.RaftRequest.SerializeToString, response_deserializer=dcache__pb2.RaftReply.FromString, ) self.InstallSnapshot = channel.unary_unary( '/dcache.DcacheService/InstallSnapshot', request_serializer=dcache__pb2.RaftRequest.SerializeToString, response_deserializer=dcache__pb2.RaftReply.FromString, ) self.vote = channel.unary_unary( '/dcache.DcacheService/vote', request_serializer=dcache__pb2.RaftRequest.SerializeToString, response_deserializer=dcache__pb2.RaftReply.FromString, ) class DcacheServiceServicer(object): """Missing associated documentation comment in .proto file.""" def AddCaptcha(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def AddVisitor(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def RenameCaptcha(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def RemoveCaptcha(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def CachePow(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def CacheResult(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def AddLearner(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def Write(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def Forward(self, request, context): """/ Forward a request to other """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def AppendEntries(self, request, context): """raft RPC """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def InstallSnapshot(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def vote(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') def add_DcacheServiceServicer_to_server(servicer, server): rpc_method_handlers = { 'AddCaptcha': grpc.unary_unary_rpc_method_handler( servicer.AddCaptcha, request_deserializer=dcache__pb2.AddCaptchaRequest.FromString, response_serializer=dcache__pb2.RaftReply.SerializeToString, ), 'AddVisitor': grpc.unary_unary_rpc_method_handler( servicer.AddVisitor, request_deserializer=dcache__pb2.CaptchaID.FromString, response_serializer=dcache__pb2.OptionAddVisitorResult.SerializeToString, ), 'RenameCaptcha': grpc.unary_unary_rpc_method_handler( servicer.RenameCaptcha, request_deserializer=dcache__pb2.RenameCaptchaRequest.FromString, response_serializer=dcache__pb2.RaftReply.SerializeToString, ), 'RemoveCaptcha': grpc.unary_unary_rpc_method_handler( servicer.RemoveCaptcha, request_deserializer=dcache__pb2.CaptchaID.FromString, response_serializer=dcache__pb2.RaftReply.SerializeToString, ), 'CachePow': grpc.unary_unary_rpc_method_handler( servicer.CachePow, request_deserializer=dcache__pb2.CachePowRequest.FromString, response_serializer=dcache__pb2.RaftReply.SerializeToString, ), 'CacheResult': grpc.unary_unary_rpc_method_handler( servicer.CacheResult, request_deserializer=dcache__pb2.CacheResultRequest.FromString, response_serializer=dcache__pb2.RaftReply.SerializeToString, ), 'AddLearner': grpc.unary_unary_rpc_method_handler( servicer.AddLearner, request_deserializer=dcache__pb2.Learner.FromString, response_serializer=dcache__pb2.RaftReply.SerializeToString, ), 'Write': grpc.unary_unary_rpc_method_handler( servicer.Write, request_deserializer=dcache__pb2.RaftRequest.FromString, response_serializer=dcache__pb2.RaftReply.SerializeToString, ), 'Forward': grpc.unary_unary_rpc_method_handler( servicer.Forward, request_deserializer=dcache__pb2.RaftRequest.FromString, response_serializer=dcache__pb2.RaftReply.SerializeToString, ), 'AppendEntries': grpc.unary_unary_rpc_method_handler( servicer.AppendEntries, request_deserializer=dcache__pb2.RaftRequest.FromString, response_serializer=dcache__pb2.RaftReply.SerializeToString, ), 'InstallSnapshot': grpc.unary_unary_rpc_method_handler( servicer.InstallSnapshot, request_deserializer=dcache__pb2.RaftRequest.FromString, response_serializer=dcache__pb2.RaftReply.SerializeToString, ), 'vote': grpc.unary_unary_rpc_method_handler( servicer.vote, request_deserializer=dcache__pb2.RaftRequest.FromString, response_serializer=dcache__pb2.RaftReply.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'dcache.DcacheService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) # This class is part of an EXPERIMENTAL API. class DcacheService(object): """Missing associated documentation comment in .proto file.""" @staticmethod def AddCaptcha(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/dcache.DcacheService/AddCaptcha', dcache__pb2.AddCaptchaRequest.SerializeToString, dcache__pb2.RaftReply.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def AddVisitor(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/dcache.DcacheService/AddVisitor', dcache__pb2.CaptchaID.SerializeToString, dcache__pb2.OptionAddVisitorResult.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def RenameCaptcha(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/dcache.DcacheService/RenameCaptcha', dcache__pb2.RenameCaptchaRequest.SerializeToString, dcache__pb2.RaftReply.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def RemoveCaptcha(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/dcache.DcacheService/RemoveCaptcha', dcache__pb2.CaptchaID.SerializeToString, dcache__pb2.RaftReply.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def CachePow(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/dcache.DcacheService/CachePow', dcache__pb2.CachePowRequest.SerializeToString, dcache__pb2.RaftReply.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def CacheResult(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/dcache.DcacheService/CacheResult', dcache__pb2.CacheResultRequest.SerializeToString, dcache__pb2.RaftReply.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def AddLearner(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/dcache.DcacheService/AddLearner', dcache__pb2.Learner.SerializeToString, dcache__pb2.RaftReply.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def Write(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/dcache.DcacheService/Write', dcache__pb2.RaftRequest.SerializeToString, dcache__pb2.RaftReply.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def Forward(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/dcache.DcacheService/Forward', dcache__pb2.RaftRequest.SerializeToString, dcache__pb2.RaftReply.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def AppendEntries(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/dcache.DcacheService/AppendEntries', dcache__pb2.RaftRequest.SerializeToString, dcache__pb2.RaftReply.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def InstallSnapshot(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/dcache.DcacheService/InstallSnapshot', dcache__pb2.RaftRequest.SerializeToString, dcache__pb2.RaftReply.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod def vote(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/dcache.DcacheService/vote', dcache__pb2.RaftRequest.SerializeToString, dcache__pb2.RaftReply.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata)