jina.clients.base.websocket module#

A module for the websockets-based Client for Jina.

class jina.clients.base.websocket.WebSocketBaseClient(args=None, **kwargs)[source]#

Bases: BaseClient

A Websocket Client.

aio_tracing_client_interceptors()#

Create a gRPC client aio channel interceptor. :rtype: Optional[Sequence[ClientInterceptor]] :returns: An invocation-side list of aio interceptor objects.

aio_tracing_server_interceptors()#

Create a gRPC aio server interceptor. :rtype: Optional[Sequence[ServerInterceptor]] :returns: A service-side aio interceptor object.

static check_input(inputs=None, **kwargs)#

Validate the inputs and print the first request if success.

Parameters:
  • inputs (Optional[InputType]) – the inputs

  • kwargs – keyword arguments

Return type:

None

property client: T#

Return the client object itself

Return type:

TypeVar(T)

Returns:

the Client object

property inputs: InputType#

An iterator of bytes, each element represents a Document’s raw content.

inputs defined in the protobuf

Return type:

InputType

Returns:

inputs

tracing_client_interceptor()#
Return type:

Optional[OpenTelemetryClientInterceptor]

Returns:

a gRPC client interceptor with the global tracing provider.