func (si streamClientInterceptor) Interceptor() grpc.StreamClientInterceptor {
	return func(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption) (grpc.ClientStream, error) {
		// TODO: Find a more efficient way
		interceptor := streamer
		si.lock.RLock()
		for idx := len(si.interceptors) - 1; idx >= 0; idx-- {
			interceptor = chainStreamClientInterceptor(si.interceptors[idx], interceptor)
		}
		si.lock.RUnlock()
		return interceptor(ctx, desc, cc, method, opts...)
	}
}
// Interceptor chains all added interceptors into a single
// `grpc.StreamClientInterceptor`.
//
// 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.StreamClientInterceptor`.

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 . StreamClientInterceptor ` . // // The ` streamer ` passed to each interceptor is either the next interceptor or // for the last element of the chain the target method .
func (si streamClientInterceptor) Interceptor() grpc.StreamClientInterceptor {
	return func(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption) (grpc.ClientStream, error) {
		interceptor := streamer
		si.lock.RLock()
		for idx := len(si.interceptors) - 1; idx >= 0; idx-- {
			interceptor = chainStreamClientInterceptor(si.interceptors[idx], interceptor)
		}
		si.lock.RUnlock()
		return interceptor(ctx, desc, cc, method, opts...)
	}
}
func ( si streamClientInterceptor ) Interceptor ( ) grpc . StreamClientInterceptor { return func ( ctx context . Context , desc * grpc . StreamDesc , cc * grpc . ClientConn , method string , streamer grpc . Streamer , opts ... grpc . CallOption ) ( grpc . ClientStream , error ) { interceptor := streamer si . lock . RLock ( ) for idx := len ( si . interceptors ) - 1 ; idx >= 0 ; idx -- { interceptor = chainStreamClientInterceptor ( si . interceptors [ idx ] , interceptor ) } si . lock . RUnlock ( ) return interceptor ( ctx , desc , cc , method , opts ... ) } }
Interceptor chains all added interceptors into a single
`grpc.StreamClientInterceptor`.
Interceptor chains all added interceptors into a single ` grpc . StreamClientInterceptor ` .
// TODO: Find a more efficient way