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

Method RunVoid

data/cache_executor.go:84–93  ·  view source on GitHub ↗

RunVoid applies retry / hedge / breaker / timeout to an inner function that returns only error. Used for Set / Delete operations.

(
	ctx context.Context,
	inner func(ctx context.Context) error,
)

Source from the content-addressed store, hash-verified

82// RunVoid applies retry / hedge / breaker / timeout to an inner function
83// that returns only error. Used for Set / Delete operations.
84func (e *cacheExecutor) RunVoid(
85 ctx context.Context,
86 inner func(ctx context.Context) error,
87) error {
88 wrap := func(ctx context.Context) ([]byte, error) {
89 return nil, inner(ctx)
90 }
91 _, err := e.RunBytes(ctx, wrap)
92 return err
93}
94
95// execStateFromCtx returns the per-request ExecState attached to the
96// context, or nil when the cache layer is being driven outside a

Callers 2

SetMethod · 0.80
DeleteMethod · 0.80

Calls 1

RunBytesMethod · 0.95

Tested by

no test coverage detected