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

Method RunBytes

data/cache_executor.go:70–80  ·  view source on GitHub ↗

RunBytes applies retry / hedge / breaker / timeout to an inner function that returns []byte. Used for Get operations.

(
	ctx context.Context,
	inner func(ctx context.Context) ([]byte, error),
)

Source from the content-addressed store, hash-verified

68// RunBytes applies retry / hedge / breaker / timeout to an inner function
69// that returns []byte. Used for Get operations.
70func (e *cacheExecutor) RunBytes(
71 ctx context.Context,
72 inner func(ctx context.Context) ([]byte, error),
73) ([]byte, error) {
74 if e == nil {
75 return inner(ctx)
76 }
77 return e.runRetry(ctx, func(ctx context.Context) ([]byte, error) {
78 return e.runHedgeBytes(ctx, inner)
79 })
80}
81
82// RunVoid applies retry / hedge / breaker / timeout to an inner function
83// that returns only error. Used for Set / Delete operations.

Callers 2

RunVoidMethod · 0.95
GetMethod · 0.80

Calls 2

runRetryMethod · 0.95
runHedgeBytesMethod · 0.95

Tested by

no test coverage detected