Protocol Documentation#
Table of Contents#
docarray.proto#
DocumentArrayProto#
this file is just a place holder for the DA coming from docarray dependency
jina.proto#
ControlRequestProto#
Represents a ControlRequest
Field | Type | Label | Description |
---|---|---|---|
header | HeaderProto | header contains meta info defined by the user | |
command | ControlRequestProto.Command | the control command | |
relatedEntities | RelatedEntity | repeated | list of entities this ControlMessage is related to |
DataRequestListProto#
Represents a list of data requests This should be replaced by streaming
Field | Type | Label | Description |
---|---|---|---|
requests | DataRequestProto | repeated | requests in this list |
DataRequestProto#
Represents a DataRequest
Field | Type | Label | Description |
---|---|---|---|
header | HeaderProto | header contains meta info defined by the user | |
parameters | google.protobuf.Struct | extra kwargs that will be used in executor | |
routes | RouteProto | repeated | status info on every routes |
data | DataRequestProto.DataContentProto | container for docs and groundtruths |
DataRequestProto.DataContentProto#
Field | Type | Label | Description |
---|---|---|---|
docs | docarray.DocumentArrayProto | the docs in this request | |
docs_bytes | bytes | the docs in this request as bytes |
HeaderProto#
Represents a Header.
The header’s content will be defined by the user request.
It will be copied to the envelope.header
In-flow operations will modify the envelope.header
While returning, copy envelope.header back to request.header
Field | Type | Label | Description |
---|---|---|---|
request_id | string | the unique ID of this request. Multiple requests with the same ID will be gathered | |
status | StatusProto | status info | |
exec_endpoint | string | optional | the endpoint specified by @requests(on='/abc') |
target_executor | string | optional | if set, the request is targeted to certain executor, regex strings |
timeout | uint32 | optional | epoch time in seconds after which the request should be dropped |
RouteProto#
Represents a the route paths of this message as perceived by the Gateway start_time is set when the Gateway sends a message to a Pod end_time is set when the Gateway receives a message from a Pod thus end_time - start_time includes Executor computation, runtime overhead, serialization and network
Field | Type | Label | Description |
---|---|---|---|
executor | string | the name of the BasePod | |
start_time | google.protobuf.Timestamp | time when the Gateway starts sending to the Pod | |
end_time | google.protobuf.Timestamp | time when the Gateway received it from the Pod | |
status | StatusProto | the status of the execution |
StatusProto#
Represents a Status
Field | Type | Label | Description |
---|---|---|---|
code | StatusProto.StatusCode | status code | |
description | string | error description of the very first exception | |
exception | StatusProto.ExceptionProto | the details of the error |
StatusProto.ExceptionProto#
Field | Type | Label | Description |
---|---|---|---|
name | string | the class name of the exception | |
args | string | repeated | the list of arguments given to the exception constructor. |
stacks | string | repeated | the exception traceback stacks |
executor | string | the name of the executor bind to that peapod (if applicable) |
ControlRequestProto.Command#
Name | Number | Description |
---|---|---|
STATUS | 0 | check the status of the BasePod |
ACTIVATE | 1 | used to add Pods to a Pod |
DEACTIVATE | 2 | used to remove Pods from a Pod |
StatusProto.StatusCode#
Name | Number | Description |
---|---|---|
SUCCESS | 0 | success |
PENDING | 1 | there are pending messages, more messages are followed |
READY | 2 | ready to use |
ERROR | 3 | error |
ERROR_DUPLICATE | 4 | already a existing pod running |
ERROR_NOTALLOWED | 5 | not allowed to open pod remotely |
ERROR_CHAINED | 6 | chained from the previous error |
JinaControlRequestRPC#
jina gRPC service for ControlRequests.
Method Name | Request Type | Response Type | Description |
---|---|---|---|
process_control | ControlRequestProto | ControlRequestProto | Used for passing ControlRequests to the Executors |
JinaDataRequestRPC#
jina gRPC service for DataRequests.
Method Name | Request Type | Response Type | Description |
---|---|---|---|
process_data | DataRequestListProto | DataRequestProto | Used for passing DataRequests to the Executors |
JinaRPC#
jina Gateway gRPC service.
Method Name | Request Type | Response Type | Description |
---|---|---|---|
Call | DataRequestProto stream | DataRequestProto stream | Pass in a Request and a filled Request with matches will be returned. |
JinaSingleDataRequestRPC#
jina gRPC service for DataRequests. This is used to send requests to Executors when a list of requests is not needed
Method Name | Request Type | Response Type | Description |
---|---|---|---|
process_single_data | DataRequestProto | DataRequestProto | Used for passing DataRequests to the Executors |