Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterGRPCServer ¶
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