jina.proto.serializer module#

class jina.proto.serializer.ControlRequestProto[source]#

Bases: object

This class is a drop-in replacement for gRPC default serializer.

It replace default serializer to make sure we always work with Request

static SerializeToString(x)[source]#

# noqa: DAR101 # noqa: DAR102 # noqa: DAR201

static FromString(x)[source]#

# noqa: DAR101 # noqa: DAR102 # noqa: DAR201

class jina.proto.serializer.DataRequestProto[source]#

Bases: object

This class is a drop-in replacement for gRPC default serializer.

It replace default serializer to make sure we always work with Request

static SerializeToString(x)[source]#

# noqa: DAR101 # noqa: DAR102 # noqa: DAR201

static FromString(x)[source]#

# noqa: DAR101 # noqa: DAR102 # noqa: DAR201

class jina.proto.serializer.DataRequestListProto[source]#

Bases: object

This class is a drop-in replacement for gRPC default serializer. It replace default serializer to make sure the message sending interface is convenient. It can handle sending single messages or a list of messages. It also returns a list of messages. Effectively this is hiding MessageListProto from the consumer

static SerializeToString(x)[source]#

# noqa: DAR101 # noqa: DAR102 # noqa: DAR201

static FromString(x)[source]#

# noqa: DAR101 # noqa: DAR102 # noqa: DAR201

class jina.proto.serializer.EndpointsProto[source]#

Bases: object

Since the serializer is replacing the `jina_pb2 to know how to exactly serialize messages, this is just a placeholder that delegates the serializing and deserializing to the internal protobuf structure with no extra optimization.

static SerializeToString(x)[source]#

# noqa: DAR101 # noqa: DAR102 # noqa: DAR201

static FromString(x)[source]#

# noqa: DAR101 # noqa: DAR102 # noqa: DAR201