grpc

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package grpc wraps common operations to create grpc connections

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Closer

type Closer func()

Closer defines the function type that closes gRPC connections

type Connector

type Connector interface {
	NewConn() (grpc.ClientConnInterface, Closer, error)
}

Connector is an interface for creating new grpc Connections

func New

func New(address string) (Connector, error)

New returns a new gRPC connector for the server at the given address

func NewWithDialler

func NewWithDialler(address string, d Dialler) (Connector, error)

NewWithDialler returns a new gRPC client for the server at the given address using the gRPC dialler provided

type Dialler

type Dialler func(target string, opts ...grpc.DialOption) (*grpc.ClientConn, error)

Dialler defines the function type that creates a gRPC connection

Jump to

Keyboard shortcuts

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