Public Member Functions | |
def | add_insecure_port (self, address) |
def | add_secure_port (self, address, server_credentials) |
def | start (self) |
def | stop (self, grace) |
Services RPCs.
Definition at line 88 of file interfaces.py.
def grpc.beta.interfaces.Server.add_insecure_port | ( | self, | |
address | |||
) |
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.
Reimplemented in grpc.beta._server_adaptations._Server.
Definition at line 92 of file interfaces.py.
def grpc.beta.interfaces.Server.add_secure_port | ( | self, | |
address, | |||
server_credentials | |||
) |
Reserves 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.
Reimplemented in grpc.beta._server_adaptations._Server.
Definition at line 110 of file interfaces.py.
def grpc.beta.interfaces.Server.start | ( | self | ) |
Starts 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).
Reimplemented in grpc.beta._server_adaptations._Server.
Definition at line 129 of file interfaces.py.
def grpc.beta.interfaces.Server.stop | ( | self, | |
grace | |||
) |
Stops 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).
Reimplemented in grpc.beta._server_adaptations._Server.
Definition at line 138 of file interfaces.py.