Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connector ¶
type Connector struct { Host string Port int SSLName string SSLCrtFile string // Deadline in seconds Deadline int // Token string in headers Token string // TokenKey default = "authorization" TokenKey string }
Connector with gRPC dial option
func (*Connector) Connect ¶
func (c *Connector) Connect(opts ...grpc.DialOption) (*grpc.ClientConn, error)
Connect for gRPC client those dial option has include in connect - WithTransportCredentials if SSLName and SSLCrtFile is valid value - WithInsecure if SSLName and SSLCrtFile is empty value - WithPerRPCCredentials (Token and custom token key only)
func (*Connector) ContextWithDeadline ¶
func (c *Connector) ContextWithDeadline() (context.Context, context.CancelFunc)
ContextWithDeadline TL;DR
type TokenAuth ¶
func (TokenAuth) GetRequestMetadata ¶
Return value is mapped to request headers.
func (TokenAuth) RequireTransportSecurity ¶
Click to show internal directories.
Click to hide internal directories.