Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TokenCredentials ¶
type TokenCredentials struct {
// contains filtered or unexported fields
}
TokenCredentials RPC Credentials
func WithStaticToken ¶
func WithStaticToken(token string) *TokenCredentials
WithStaticToken injects a static token on each request
func WithTokenFunc ¶
func WithTokenFunc(tokenFunc func(id string) string) *TokenCredentials
WithTokenFunc returns TokenCredentials that execute the tokenFunc on each request
func (*TokenCredentials) DialOption ¶
func (c *TokenCredentials) DialOption() grpc.DialOption
DialOption returns a DialOption for the TokenCredentials
func (*TokenCredentials) GetRequestMetadata ¶
func (c *TokenCredentials) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error)
GetRequestMetadata implements credentials.PerRPCCredentials
func (*TokenCredentials) RequireTransportSecurity ¶
func (c *TokenCredentials) RequireTransportSecurity() bool
RequireTransportSecurity implements credentials.PerRPCCredentials
Click to show internal directories.
Click to hide internal directories.