MCPcopy Create free account
hub / github.com/erpc/erpc / doForward

Method doForward

erpc/projects.go:256–268  ·  view source on GitHub ↗
(ctx context.Context, network *Network, nq *common.NormalizedRequest)

Source from the content-addressed store, hash-verified

254}
255
256func (p *PreparedProject) doForward(ctx context.Context, network *Network, nq *common.NormalizedRequest) (*common.NormalizedResponse, error) {
257 switch network.cfg.Architecture {
258 case common.ArchitectureEvm:
259 // Early, project-level pre-forward (cache-affecting, upstream-agnostic)
260 if handled, resp, err := evm.HandleProjectPreForward(ctx, network, nq); handled {
261 return evm.HandleNetworkPostForward(ctx, network, nq, resp, err)
262 }
263 }
264
265 // If not handled, then fallback to the normal forward
266 resp, err := network.Forward(ctx, nq)
267 return evm.HandleNetworkPostForward(ctx, network, nq, resp, err)
268}
269
270func (p *PreparedProject) AcquireRateLimitPermit(ctx context.Context, req *common.NormalizedRequest) error {
271 if p.Config.RateLimitBudget == "" {

Callers 1

ForwardMethod · 0.95

Calls 3

HandleProjectPreForwardFunction · 0.92
HandleNetworkPostForwardFunction · 0.92
ForwardMethod · 0.65

Tested by

no test coverage detected