Executor
You can create an Executor by extending the Executor
class and adding logic to endpoint methods.
See Also
Document, Executor, and Flow are the three fundamental concepts in Jina.
Document is the basic data type in Jina;
Design Principle of Executor
Do not surprise the user: keep
Executor
class as Pythonic as possible. It should be as light and unintrusive as amixin
class:do not customize the class constructor logic;
do not add new members to the object unless needed.
We want to give our users the freedom to customize their executors easily. If a user is a good Python programmer, they should pick up Executor
in no time. It is as simple as subclassing Executor
and adding an endpoint.