Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_p2p_proto protoreflect.FileDescriptor
Functions ¶
func RegisterPeerServer ¶
func RegisterPeerServer(s *grpc.Server, srv PeerServer)
Types ¶
type GetNameReply ¶
type GetNameReply struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*GetNameReply) Descriptor
deprecated
func (*GetNameReply) Descriptor() ([]byte, []int)
Deprecated: Use GetNameReply.ProtoReflect.Descriptor instead.
func (*GetNameReply) GetName ¶
func (x *GetNameReply) GetName() string
func (*GetNameReply) ProtoMessage ¶
func (*GetNameReply) ProtoMessage()
func (*GetNameReply) ProtoReflect ¶
func (x *GetNameReply) ProtoReflect() protoreflect.Message
func (*GetNameReply) Reset ¶
func (x *GetNameReply) Reset()
func (*GetNameReply) String ¶
func (x *GetNameReply) String() string
type GetNameRequest ¶
type GetNameRequest struct {
// contains filtered or unexported fields
}
func (*GetNameRequest) Descriptor
deprecated
func (*GetNameRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetNameRequest.ProtoReflect.Descriptor instead.
func (*GetNameRequest) ProtoMessage ¶
func (*GetNameRequest) ProtoMessage()
func (*GetNameRequest) ProtoReflect ¶
func (x *GetNameRequest) ProtoReflect() protoreflect.Message
func (*GetNameRequest) Reset ¶
func (x *GetNameRequest) Reset()
func (*GetNameRequest) String ¶
func (x *GetNameRequest) String() string
type PeerClient ¶
type PeerClient interface { GetName(ctx context.Context, in *GetNameRequest, opts ...grpc.CallOption) (*GetNameReply, error) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingReply, error) }
PeerClient is the client API for Peer service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewPeerClient ¶
func NewPeerClient(cc grpc.ClientConnInterface) PeerClient
type PeerServer ¶
type PeerServer interface { GetName(context.Context, *GetNameRequest) (*GetNameReply, error) Ping(context.Context, *PingRequest) (*PingReply, error) // contains filtered or unexported methods }
PeerServer is the server API for Peer service. All implementations must embed UnimplementedPeerServer for forward compatibility
type PingReply ¶
type PingReply struct { Payload string `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` // contains filtered or unexported fields }
func (*PingReply) Descriptor
deprecated
func (*PingReply) GetPayload ¶
func (*PingReply) ProtoMessage ¶
func (*PingReply) ProtoMessage()
func (*PingReply) ProtoReflect ¶
func (x *PingReply) ProtoReflect() protoreflect.Message
type PingRequest ¶
type PingRequest struct { Payload string `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` // contains filtered or unexported fields }
func (*PingRequest) Descriptor
deprecated
func (*PingRequest) Descriptor() ([]byte, []int)
Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.
func (*PingRequest) GetPayload ¶
func (x *PingRequest) GetPayload() string
func (*PingRequest) ProtoMessage ¶
func (*PingRequest) ProtoMessage()
func (*PingRequest) ProtoReflect ¶
func (x *PingRequest) ProtoReflect() protoreflect.Message
func (*PingRequest) Reset ¶
func (x *PingRequest) Reset()
func (*PingRequest) String ¶
func (x *PingRequest) String() string
type UnimplementedPeerServer ¶
type UnimplementedPeerServer struct { }
UnimplementedPeerServer must be embedded to have forward compatible implementations.
func (UnimplementedPeerServer) GetName ¶
func (UnimplementedPeerServer) GetName(context.Context, *GetNameRequest) (*GetNameReply, error)
func (UnimplementedPeerServer) Ping ¶
func (UnimplementedPeerServer) Ping(context.Context, *PingRequest) (*PingReply, error)
type UnsafePeerServer ¶
type UnsafePeerServer interface {
// contains filtered or unexported methods
}
UnsafePeerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PeerServer will result in compilation errors.