Skip to content
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

API Manager #386

Open
qwer951123 opened this issue Jul 1, 2022 · 2 comments
Open

API Manager #386

qwer951123 opened this issue Jul 1, 2022 · 2 comments

Comments

@qwer951123
Copy link
Contributor

qwer951123 commented Jul 1, 2022

  • speed ​​measure
  • support connect the fastest endpoint
  • return promise/rxjs api
  • support report the endpoint health status
  • support manager multiply chains
@qwer951123
Copy link
Contributor Author

qwer951123 commented Jul 1, 2022

configs

  • chains
    1. name, string, chain name
    2. endpoints, [string] the endpoints of the chain
    3. isRelayChain, boolean, should set true when the chain is a relay chain
    4. parachainId, number, the params chain id, will be ignored when the isRealyChain is true
    5. autoConnect, boolean, auto-connect when set true
    6. custom, (options) => options, custom API options configs
    7. timeout
  • endpoint health
    1. health
    2. busy
    3. error

@qwer951123
Copy link
Contributor Author

qwer951123 commented Jul 1, 2022

methods

  • getApi get api
  • status$ subscribe to the status of the connected endpoint
  • health$ subscribe to the connected health of the connected endpoint
  • endpointsReport$ subscribe all endpoints ping-pong test result
  • connect manual connect
  • disconnect manual disconnect

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

No branches or pull requests

1 participant