;iedZddlZddlZejZeje_ejZGddeZd dZ ej Z ej Z ejZGddejZGd d ejZGd d ejZdS)z8Constants and interfaces of the Beta API of gRPC Python.NceZdZdZdZdS)GRPCCallOptionszA value encapsulating gRPC-specific options passed on RPC invocation. This class and its instances have no supported interface - it exists to define the type of its instances and its instances exist to be passed to other functions. c0||_||_||_dS)N)disable_compression subcall_of credentials)selfrrrs HC:\PYTHON\MyICR_Workspace\venv\Lib\site-packages\grpc/beta/interfaces.py__init__zGRPCCallOptions.__init__#s#6 $&N)__name__ __module__ __qualname____doc__r r r rrs-'''''r rFc$t|d|S)aCreates a GRPCCallOptions value to be passed at RPC invocation. All parameters are optional and should always be passed by keyword. Args: disable_compression: A boolean indicating whether or not compression should be disabled for the request object of the RPC. Only valid for request-unary RPCs. credentials: A CallCredentials object to use for the invoked RPC. N)r)rrs r grpc_call_optionsr)s .k B BBr cReZdZdZejdZejdZdS)GRPCServicerContextzCExposes gRPC-specific options and behaviors to code servicing RPCs.ct)zIdentifies the peer that invoked the RPC being serviced. Returns: A string identifying the peer that invoked the RPC being serviced. NotImplementedErrorr s r peerzGRPCServicerContext.peer?"###r ct)zDDisables compression of the next response passed by the application.rrs r !disable_next_response_compressionz5GRPCServicerContext.disable_next_response_compressionH"###r N)r rrrabcabstractmethodrrrr r rr<sVMM$$$ $$$$$r rc2eZdZdZejdZdS)GRPCInvocationContextzBExposes gRPC-specific options and behaviors to code invoking RPCs.ct)zCDisables compression of the next request passed by the application.rrs r disable_next_request_compressionz6GRPCInvocationContext.disable_next_request_compressionQrr N)r rrrrr r$rr r r"r"Ns7LL$$$$$r r"ceZdZdZejdZejdZejdZejdZ dS)ServerzServices RPCs.ct)a@Reserves a port for insecure RPC service once this Server becomes active. This method may only be called before calling this Server's start method is called. Args: address: The address for which to open a port. Returns: An integer port on which RPCs will be serviced after this link has been started. This is typically the same number as the port number contained in the passed address, but will likely be different if the port number contained in the passed address was zero. r)r addresss r add_insecure_portzServer.add_insecure_portZs "###r ct)arReserves a port for secure RPC service after this Server becomes active. This method may only be called before calling this Server's start method is called. Args: address: The address for which to open a port. server_credentials: A ServerCredentials. Returns: An integer port on which RPCs will be serviced after this link has been started. This is typically the same number as the port number contained in the passed address, but will likely be different if the port number contained in the passed address was zero. r)r r(server_credentialss r add_secure_portzServer.add_secure_portls""###r ct)zStarts this Server's service of RPCs. This method may only be called while the server is not serving RPCs (i.e. it is not idempotent). rrs r startz Server.startrr ct)aStops this Server's service of RPCs. All calls to this method immediately stop service of new RPCs. When existing RPCs are aborted is controlled by the grace period parameter passed to this method. This method may be called at any time and is idempotent. Passing a smaller grace value than has been passed in a previous call will have the effect of stopping the Server sooner. Passing a larger grace value than has been passed in a previous call will not have the effect of stopping the server later. Args: grace: A duration of time in seconds to allow existing RPCs to complete before being aborted by this Server's stopping. May be zero for immediate abortion of all in-progress RPCs. Returns: A threading.Event that will be set when this Server has completely stopped. The returned event may not be set until after the full grace period (if some ongoing RPC continues for the full length of the period) of it may be set much sooner (such as if this Server had no RPCs underway at the time it was stopped or if all RPCs that it had underway completed very early in the grace period). r)r graces r stopz Server.stops6"###r N) r rrrrr r)r,r.r1rr r r&r&Ws$$$" $$$$ $$$ $$$$$r r&)FN)rrgrpcChannelConnectivitySHUTDOWN FATAL_FAILURE StatusCodeobjectrrAuthMetadataContextGRPCAuthMetadataContextAuthMetadataPluginCallbackGRPCAuthMetadataPluginCallbackAuthMetadataPluginGRPCAuthMetadataPluginABCrr"r&rr r r?s2?> .$7$@! _  ' ' ' ' 'f ' ' ' C C C C2!%!@0$$$$$#'$$$$$$$$$CG$$$L$L$L$L$L$SWL$L$L$L$L$r