django_socio_grpc.request_transformer.grpc_internal_proxy

Module Contents

Classes

GRPCInternalProxyContext

Proxy context, provide http1 proxy request object and grpc context object Used principally for request data based mechanisme, example: filtering, middleware, authentication

GRPCInternalProxyResponse

Proxy response, provide http1 response and grpc respone object Used principally to middleware. Not doing anything speciale for now but not crashing when using. Need to be improved if some specific behavior needed, for example injecting some data in the reponse metadata.

API

class django_socio_grpc.request_transformer.grpc_internal_proxy.GRPCInternalProxyContext

Proxy context, provide http1 proxy request object and grpc context object Used principally for request data based mechanisme, example: filtering, middleware, authentication

grpc_context: grpc.aio.ServicerContext

None

grpc_action: str

None

http_request: django_socio_grpc.request_transformer.socio_internal_request.InternalHttpRequest

None

__post_init__()
__getattr__(attr)
class django_socio_grpc.request_transformer.grpc_internal_proxy.GRPCInternalProxyResponse

Proxy response, provide http1 response and grpc respone object Used principally to middleware. Not doing anything speciale for now but not crashing when using. Need to be improved if some specific behavior needed, for example injecting some data in the reponse metadata.

grpc_response: grpc.aio._typing.ResponseType

None

http_response: django_socio_grpc.request_transformer.socio_internal_response.InternalHttpResponse

None

__post_init__()
__getattr__(attr)
__aiter__()
async __anext__()

Used to iterate over the proxy to the grpc_response as the http response can’t be iterate over

__iter__()
__next__()

Used to iterate over the proxy to the grpc_response as the http response can’t be iterate over