types

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	peerpb.PeerClient
	io.Closer
}

Client defines an interface that Peer service client should implement.

type ClientBuilder

type ClientBuilder interface {
	// Client builds a new Client that connects to the given target.
	Client(target string) (Client, error)
}

ClientBuilder creates a new Client.

type LocalClientBuilder

type LocalClientBuilder struct {
	DialTimeout time.Duration
}

LocalClientBuilder is a ClientBuilder that is suitable when the gRPC connection to the Peer service is local (typically a Unix Domain Socket).

func (LocalClientBuilder) Client

func (b LocalClientBuilder) Client(target string) (Client, error)

Client implements ClientBuilder.Client.

Jump to

Keyboard shortcuts

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