func (ui *unaryClientInterceptor) Interceptor() grpc.UnaryClientInterceptor {
	return func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {
		// TODO: Find a more efficient way
		interceptor := invoker
		ui.lock.RLock()
		for idx := len(ui.interceptors) - 1; idx >= 0; idx-- {
			interceptor = chainUnaryClientInterceptor(ui.interceptors[idx], interceptor)
		}
		ui.lock.RUnlock()
		return interceptor(ctx, method, req, reply, cc, opts...)
	}
}
// Interceptor chains all added interceptors into a single
// `grpc.UnaryClientInterceptor`.
//
// The `streamer` passed to each interceptor is either the next interceptor or,
// for the last element of the chain, the target method.
Interceptor chains all added interceptors into a single
`grpc.UnaryClientInterceptor`.

The `streamer` passed to each interceptor is either the next interceptor or,
for the last element of the chain, the target method.
// Interceptor chains all added interceptors into a single // ` grpc . UnaryClientInterceptor ` . // // The ` streamer ` passed to each interceptor is either the next interceptor or // for the last element of the chain the target method .
func (ui *unaryClientInterceptor) Interceptor() grpc.UnaryClientInterceptor {
	return func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {
		interceptor := invoker
		ui.lock.RLock()
		for idx := len(ui.interceptors) - 1; idx >= 0; idx-- {
			interceptor = chainUnaryClientInterceptor(ui.interceptors[idx], interceptor)
		}
		ui.lock.RUnlock()
		return interceptor(ctx, method, req, reply, cc, opts...)
	}
}
func ( ui * unaryClientInterceptor ) Interceptor ( ) grpc . UnaryClientInterceptor { return func ( ctx context . Context , method string , req , reply interface { } , cc * grpc . ClientConn , invoker grpc . UnaryInvoker , opts ... grpc . CallOption ) error { interceptor := invoker ui . lock . RLock ( ) for idx := len ( ui . interceptors ) - 1 ; idx >= 0 ; idx -- { interceptor = chainUnaryClientInterceptor ( ui . interceptors [ idx ] , interceptor ) } ui . lock . RUnlock ( ) return interceptor ( ctx , method , req , reply , cc , opts ... ) } }
Interceptor chains all added interceptors into a single
`grpc.UnaryClientInterceptor`.
Interceptor chains all added interceptors into a single ` grpc . UnaryClientInterceptor ` .
// TODO: Find a more efficient way