connect

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2019 License: MIT Imports: 10 Imported by: 1

README

connect

GoDoc

GRPC connections utils.

Basic usage
import (
  "libs.altipla.consulting/connect"
)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Insecure

func Insecure(address string, opts ...grpc.DialOption) (*grpc.ClientConn, error)

Insecure opens an insecure local connection to debug in the dev machines. Unsuitable for production because everything would have to be in the same Kubernetes cluster.

func Local

func Local(address, clientID, clientSecret string, opts ...grpc.DialOption) (*grpc.ClientConn, error)

Local opens a connection to the nearest endpoint. In development it uses an insecure local channel and in production it uses the client credentials to request an OAuth2 token from BeAuth.io and authenticates every request with it.

func OAuthToken

func OAuthToken(address, clientID, clientSecret string, opts ...grpc.DialOption) (*grpc.ClientConn, error)

OAuthToken opens a connection using OAuth2 tokens obtained from BeAuth.io users or clients.

Types

This section is empty.

Jump to

Keyboard shortcuts

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