-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: custom gateway #5465
docs: custom gateway #5465
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5465 +/- ##
==========================================
- Coverage 86.24% 84.60% -1.65%
==========================================
Files 101 101
Lines 6667 6657 -10
==========================================
- Hits 5750 5632 -118
- Misses 917 1025 +108
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
* Defining your API Gateway interface. You can define your JSON schema or protos,... | ||
|
||
Customization is allowed different components: | ||
* Implementing the custom gateway using a `base` gateway class: {class}`~jina.Gateway` or {class}`~jina.serve.runtimes.gateway.http.fastapi.FastAPIBaseGateway`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separate the 2 options. Let's focus on explaining BaseGateway and then have another section for FastAPI.
BTW. For FastAPI we could already expose the health check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's already a section called Implementing the custom gateway
which is split in 2 parts for each base gateway
Jina Gateway Runtime will instantiate your implemented class, inject runtime arguments and user-defined arguments to it, | ||
run it, send health-checks to it and orchestrate it. | ||
|
||
Two Base Gateway classes are provided to allow implementing a custom gateway: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets add FastAPI only in a separatr section
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's already a separate subsection for fast api
|
||
(gateway-streamer)= | ||
## Calling Executors with {class}`~jina.serve.streamer.GatewayStreamer` | ||
{class}`~jina.serve.streamer.GatewayStreamer` allows you to interface with Executors within the gateway. An instance of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to explain what this streamer is and what the user needs to do with it: What methods are exposed, what behaviour do they implement, what is the user expected to do, what are inputs outputs, etc. Some of this will be in the relevant docstrings, then I would at least link to those
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what this streamer is and what the user needs to do with it
added more description
What methods are exposed
The user only needs to know about stream_docs
. An example is provided
what is the user expected to do, what are inputs outputs
done
Some of this will be in the relevant docstrings, then I would at least link to those
All mentions of gateway streamer already link to the python api (the links only show properly on released doc builds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more suggestions, sorry, I am always a pain on this stuff ;)
Co-authored-by: Johannes Messner <44071807+JohannesMessner@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like it a lot now 👍
📝 Docs are deployed on https://docs-custom-gateway--jina-docs.netlify.app 🎉 |
…into docs-custom-gateway
📝 Docs are deployed on https://docs-custom-gateway--jina-docs.netlify.app 🎉 |
Add documentation for the custom gateway
Custom gateway docs:
YAML spec: