Documentation ¶
Index ¶
- Constants
- type GRPCProtocol
- func (grpcProtocol *GRPCProtocol) Dial(ctx context.Context, peerID peer.ID, dialOpts ...grpc.DialOption) (*grpc.ClientConn, error)
- func (grpcProtocol *GRPCProtocol) GetDialOption(ctx context.Context) grpc.DialOption
- func (grpcProtocol *GRPCProtocol) GetGRPCServer() *grpc.Server
- func (grpcProtocol *GRPCProtocol) HandleStream(stream network.Stream)
Constants ¶
View Source
const Protocol protocol.ID = "/grpc/1.0.0"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GRPCProtocol ¶
type GRPCProtocol struct {
// contains filtered or unexported fields
}
* GRPC-transported protocol handler for libp2p hosts (github.com/libp2p/go-libp2p-core/host#host).
func NewGRPCProtocol ¶
func NewGRPCProtocol(ctx context.Context, host host.Host, transportCredentials credentials.TransportCredentials) *GRPCProtocol
func (*GRPCProtocol) Dial ¶
func (grpcProtocol *GRPCProtocol) Dial(ctx context.Context, peerID peer.ID, dialOpts ...grpc.DialOption) (*grpc.ClientConn, error)
func (*GRPCProtocol) GetDialOption ¶
func (grpcProtocol *GRPCProtocol) GetDialOption(ctx context.Context) grpc.DialOption
func (*GRPCProtocol) GetGRPCServer ¶
func (grpcProtocol *GRPCProtocol) GetGRPCServer() *grpc.Server
func (*GRPCProtocol) HandleStream ¶
func (grpcProtocol *GRPCProtocol) HandleStream(stream network.Stream)
Click to show internal directories.
Click to hide internal directories.