From b233f66470f6085e3dfd05f0729fd3579997c2cf Mon Sep 17 00:00:00 2001 From: Igor Zibarev Date: Sat, 10 Oct 2020 23:16:00 +0300 Subject: [PATCH] Remove experimental comment from client interceptors --- interceptor.go | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/interceptor.go b/interceptor.go index d1a609e4893d..41da7e3010aa 100644 --- a/interceptor.go +++ b/interceptor.go @@ -25,25 +25,31 @@ import ( // UnaryInvoker is called by UnaryClientInterceptor to complete RPCs. type UnaryInvoker func(ctx context.Context, method string, req, reply interface{}, cc *ClientConn, opts ...CallOption) error -// UnaryClientInterceptor intercepts the execution of a unary RPC on the client. invoker is the handler to complete the RPC -// and it is the responsibility of the interceptor to call it. +// UnaryClientInterceptor intercepts the execution of a unary RPC on the client. The interceptors can be set on the +// client connection using WithUnaryInterceptor or WithChainUnaryInterceptor. If client connections has the interceptor set, +// then it delegates all unary RPC invocations to the interceptor, and it is the responsibility of the interceptor to call +// invoke. // -// Experimental +// method is RPC name. req and reply are corresponding request and response RPC messages. cc is the client connection +// the RPC is invoked on. invoker is the handler to complete the RPC and it is the responsibility of the interceptor to call it. +// opts contain all applicable call options, including defaults from client connection as well as per-call options. // -// Notice: This type is EXPERIMENTAL and may be changed or removed in a -// later release. +// The returned error must be compatible with the status package. type UnaryClientInterceptor func(ctx context.Context, method string, req, reply interface{}, cc *ClientConn, invoker UnaryInvoker, opts ...CallOption) error // Streamer is called by StreamClientInterceptor to create a ClientStream. type Streamer func(ctx context.Context, desc *StreamDesc, cc *ClientConn, method string, opts ...CallOption) (ClientStream, error) -// StreamClientInterceptor intercepts the creation of ClientStream. It may return a custom ClientStream to intercept all I/O -// operations. streamer is the handler to create a ClientStream and it is the responsibility of the interceptor to call it. +// StreamClientInterceptor intercepts the creation of ClientStream. The interceptors can be set on the client connection +// using WithStreamInterceptor or WithChainStreamInterceptor. If client connection has the interceptor set, then it delegates +// all stream creations to the interceptor, and it is the responsibility of the interceptor to call streamer. // -// Experimental +// desc contains stream description. cc is the client connection the RPC is invoked on. streamer is the handler to create +// a ClientStream and it is the responsibility of the interceptor to call it. opts contain all applicable call options, +// including defaults from client connection as well as per-call options. // -// Notice: This type is EXPERIMENTAL and may be changed or removed in a -// later release. +// StreamClientInterceptor may return a custom ClientStream to intercept all I/O operations. +// The returned error must be compatible with the status package. type StreamClientInterceptor func(ctx context.Context, desc *StreamDesc, cc *ClientConn, method string, streamer Streamer, opts ...CallOption) (ClientStream, error) // UnaryServerInfo consists of various information about a unary RPC on