dialer

package
v2.0.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package dialer provides client utitilies for RTrade gRPC services

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCredentials

func NewCredentials(token string, withTransportSecurity bool) credentials.PerRPCCredentials

NewCredentials instantiates a new credentials container

func SecureRequestContext

func SecureRequestContext(ctx context.Context, key string) context.Context

SecureRequestContext attaches given key as metadata to the provided context

Types

type Credentials

type Credentials struct {
	// contains filtered or unexported fields
}

Credentials holds per-rpc metadata for the gRPC clients

func (Credentials) GetRequestMetadata

func (c Credentials) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error)

GetRequestMetadata retrieves relevant metadata

func (Credentials) RequireTransportSecurity

func (c Credentials) RequireTransportSecurity() bool

RequireTransportSecurity indicates that transport security is required

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL