Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client grpc client definition
func (*Client) ChainUnaryClient ¶
func (c *Client) ChainUnaryClient() grpc.UnaryClientInterceptor
ChainUnaryClient creates a single interceptor out of a chain of many interceptors. Execution is done in left-to-right order, including passing of context. For example ChainUnaryClient(one, two, three) will execute one before two before three.
func (*Client) GetBreakers ¶
func (c *Client) GetBreakers() *breaker.BreakerGroup
GetConn return the client breakers
func (*Client) GetConn ¶
func (c *Client) GetConn() *grpc.ClientConn
GetConn return the client connection
func (*Client) Use ¶
func (c *Client) Use(interceptors ...grpc.UnaryClientInterceptor)
Use attaches a global interceptor to the client. ie. the interceptor attached through Use() will be included in the interceptors chain for every single request. For example, this is the right place for a logger or error management interceptor.
func (*Client) WithUnaryServerChain ¶
func (c *Client) WithUnaryServerChain() grpc.DialOption
Chain creates a single interceptor out of a chain of many interceptors. WithUnaryServerChain is a grpc.Client dial option that accepts multiple unary interceptors. Basically syntactic sugar.