Skip to content

JSON RPC support over socket with OpenRPC docs #75

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

Open
wants to merge 43 commits into
base: master
Choose a base branch
from

Conversation

maximevanhees
Copy link

No description provided.

maximevanhees and others added 26 commits April 7, 2025 17:59
- Added detailed documentation for the new JSON-RPC API, including
  OpenRPC specification, request/response formats, client example, and
  error codes.
- Updated documentation for the line-based API to clarify its role
  relative to the JSON-RPC API.
- Corrected a link in the main README.md file.
- Expanded the API documentation to include separate sections for the
  line-based protocol and the JSON-RPC API.
docs: Improve and expand Zinit API documentation
@maximevanhees
Copy link
Author

This pull request contains the following changes:

  • Replaced the protocol over Unix socket to JSON-RPC 2.0.
  • [NEW] zinit-http: a standalone HTTP-proxy that forwards RPC requests over the Unix socket
  • [NEW] zinit-client: client library to abstract the inner workings of Zinit
  • Updated documentation

@maximevanhees
Copy link
Author

The zinit-http proxy has been removed and is now part of zinit itself. The proxy can be activated by providing the following command:

zinit proxy -a <address:port> to expose the proxy at said endpoint.

Exposing the proxy at e.g. 0.0.0.0:8080 and enabling port-forwarding when running zinit inside a Docker container:

  • First build with docker make
  • Then run with docker run -d -t --device=/dev/kmsg:/dev/kmsg:rw -p 8080:8080 zinit-ubuntu:18.04

Allows to access the OpenRPC spec on https://playground.open-rpc.org by supplying http://localhost:8080. This will automatically call the rpc.discover method and fetch the spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants