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

Begins forcing access to the RPC through an object #3113

Merged
merged 15 commits into from
Aug 1, 2023

Conversation

tjayrush
Copy link
Member

@tjayrush tjayrush commented Jul 31, 2023

We're going to make all access to the RPC go through an object (maybe called the Provider?) This will have a lot of benefits:

  1. We can initialize that object in options.go, so that by the time to execution gets to Validate and then the Handlers, we know we have a connection,
  2. We can make the RPC connection a field on the opts structures for each tool. In this way, we no longer have to pass it around through the function interfaces. This makes the code much easier to read. This has the benefit that every handler automatically has caching which was not true previously, for example.
  3. We can add features in the future such as rate limiting and/or API keys
  4. We remove the "danger" of having an nil rpcOptions object which was creeping into the code.
  5. The documentation is MUCH easier to read.

@tjayrush tjayrush force-pushed the feature/rpcClient-as-object branch from 96e0961 to f5f87f6 Compare August 1, 2023 00:30
@tjayrush tjayrush merged commit 8b5bdbd into develop Aug 1, 2023
@tjayrush tjayrush deleted the feature/rpcClient-as-object branch August 1, 2023 04:05
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.

1 participant