Function
nativeProxyClientExec
(p *NativeProxy, fn func(*GRPCClient) (V, error))
Source from the content-addressed store, hash-verified
| 511 | } |
| 512 | |
| 513 | func nativeProxyClientExec[K comparable, V string | bool | float64 | int](p *NativeProxy, fn func(*GRPCClient) (V, error)) (V, error) { |
| 514 | p.clientMu.RLock() |
| 515 | defer p.clientMu.RUnlock() |
| 516 | |
| 517 | if p.client == nil { |
| 518 | return zeroValue[V](), fmt.Errorf("gRPC client not initialized") |
| 519 | } |
| 520 | |
| 521 | return fn(p.client) |
| 522 | } |
| 523 | |
| 524 | func nativeProxyClientExecWithoutArgument(p *NativeProxy, fn func(*GRPCClient) error) error { |
| 525 | p.clientMu.RLock() |
Callers
nothing calls this directly
Tested by
no test coverage detected