grpc

package
v0.0.0-...-60f325a Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2021 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterGRPCServer

func RegisterGRPCServer(universe *gc.Universe, grpcServer *grpc.Server)

RegisterGRPCServer registers the given grpc.Server with a Universe for GetFromPeer calls over RPC. In order for traces to propogate properly, create the grpcServer with an opencensus ServerHandler (https://godoc.org/go.opencensus.io/plugin/ocgrpc#example-ServerHandler)

Types

type GRPCFetchProtocol

type GRPCFetchProtocol struct {
	// connection set up configurations for all peers
	PeerDialOptions []grpc.DialOption
}

GRPCFetchProtocol specifies GRPC specific options for GRPC-based peer communcation

func NewGRPCFetchProtocol

func NewGRPCFetchProtocol(dialOpts ...grpc.DialOption) *GRPCFetchProtocol

NewGRPCFetchProtocol creates a fetch-protocol implementation using GRPC for communicating with peers. Users without TLS certificates on the peers operating as servers should specify grpc.WithInsecure() as one of the arguments.

func (*GRPCFetchProtocol) NewFetcher

func (gp *GRPCFetchProtocol) NewFetcher(address string) (gc.RemoteFetcher, error)

NewFetcher implements the FetchProtocol interface for GRPCFetchProtocol by constructing a new fetcher to fetch from peers via GRPC

Jump to

Keyboard shortcuts

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