connect

package
v1.78.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2021 License: MIT Imports: 8 Imported by: 1

Documentation

Overview

Package connect establishes connections to local or remote GRPC services with a more convenient set of options.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Internal added in v1.15.0

func Internal(endpoint Endpoint, opts ...grpc.DialOption) (*grpc.ClientConn, error)

Internal opens a new connection to the internal part of the endpoint.

func Remote added in v1.15.0

func Remote(endpoint Endpoint, opts ...grpc.DialOption) (*grpc.ClientConn, error)

Remote opens a new connection to the remote part of the endpoint.

func WithBearer added in v1.15.0

func WithBearer(accessToken string) grpc.DialOption

WithBearer dials the remote server with a Bearer token in every request.

Types

type Endpoint added in v1.15.0

type Endpoint struct {
	Internal, Remote string
}

Endpoint completely defines a service, locally and remotely. Both are optional depending on the function of this package you call to connect.

Jump to

Keyboard shortcuts

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