Skip to content
This repository was archived by the owner on Dec 15, 2025. It is now read-only.

JSON RPC support over socket with OpenRPC docs#75

Merged
despiegk merged 44 commits intomasterfrom
json_rpc
May 24, 2025
Merged

JSON RPC support over socket with OpenRPC docs#75
despiegk merged 44 commits intomasterfrom
json_rpc

Conversation

@maximevanhees
Copy link
Contributor

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
Contributor 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
Contributor 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.

@despiegk despiegk merged commit 66a5cae into master May 24, 2025
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants