Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var File_rpc_proto protoreflect.FileDescriptor
Functions ¶
func RegisterGrpcServer ¶
func RegisterGrpcServer(s *grpc.Server, srv GrpcServer)
Types ¶
type GrpcClient ¶
type GrpcClient interface { GetSectorID(ctx context.Context, in *SectorIDRequest, opts ...grpc.CallOption) (*SectorIDResponse, error) GetHeight(ctx context.Context, in *HeightRequest, opts ...grpc.CallOption) (*HeightResponse, error) }
GrpcClient is the client API for Grpc service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewGrpcClient ¶
func NewGrpcClient(cc grpc.ClientConnInterface) GrpcClient
type GrpcServer ¶
type GrpcServer interface { GetSectorID(context.Context, *SectorIDRequest) (*SectorIDResponse, error) GetHeight(context.Context, *HeightRequest) (*HeightResponse, error) }
GrpcServer is the server API for Grpc service.
type HeightRequest ¶
type HeightRequest struct { Question int64 `protobuf:"varint,1,opt,name=question,proto3" json:"question,omitempty"` // contains filtered or unexported fields }
func (*HeightRequest) Descriptor
deprecated
func (*HeightRequest) Descriptor() ([]byte, []int)
Deprecated: Use HeightRequest.ProtoReflect.Descriptor instead.
func (*HeightRequest) GetQuestion ¶
func (x *HeightRequest) GetQuestion() int64
func (*HeightRequest) ProtoMessage ¶
func (*HeightRequest) ProtoMessage()
func (*HeightRequest) ProtoReflect ¶
func (x *HeightRequest) ProtoReflect() protoreflect.Message
func (*HeightRequest) Reset ¶
func (x *HeightRequest) Reset()
func (*HeightRequest) String ¶
func (x *HeightRequest) String() string
type HeightResponse ¶
type HeightResponse struct { Answer int64 `protobuf:"varint,1,opt,name=answer,proto3" json:"answer,omitempty"` // contains filtered or unexported fields }
func (*HeightResponse) Descriptor
deprecated
func (*HeightResponse) Descriptor() ([]byte, []int)
Deprecated: Use HeightResponse.ProtoReflect.Descriptor instead.
func (*HeightResponse) GetAnswer ¶
func (x *HeightResponse) GetAnswer() int64
func (*HeightResponse) ProtoMessage ¶
func (*HeightResponse) ProtoMessage()
func (*HeightResponse) ProtoReflect ¶
func (x *HeightResponse) ProtoReflect() protoreflect.Message
func (*HeightResponse) Reset ¶
func (x *HeightResponse) Reset()
func (*HeightResponse) String ¶
func (x *HeightResponse) String() string
type SectorIDRequest ¶
type SectorIDRequest struct { Question string `protobuf:"bytes,1,opt,name=question,proto3" json:"question,omitempty"` // contains filtered or unexported fields }
func (*SectorIDRequest) Descriptor
deprecated
func (*SectorIDRequest) Descriptor() ([]byte, []int)
Deprecated: Use SectorIDRequest.ProtoReflect.Descriptor instead.
func (*SectorIDRequest) GetQuestion ¶
func (x *SectorIDRequest) GetQuestion() string
func (*SectorIDRequest) ProtoMessage ¶
func (*SectorIDRequest) ProtoMessage()
func (*SectorIDRequest) ProtoReflect ¶
func (x *SectorIDRequest) ProtoReflect() protoreflect.Message
func (*SectorIDRequest) Reset ¶
func (x *SectorIDRequest) Reset()
func (*SectorIDRequest) String ¶
func (x *SectorIDRequest) String() string
type SectorIDResponse ¶
type SectorIDResponse struct { Answer uint64 `protobuf:"varint,1,opt,name=answer,proto3" json:"answer,omitempty"` // contains filtered or unexported fields }
func (*SectorIDResponse) Descriptor
deprecated
func (*SectorIDResponse) Descriptor() ([]byte, []int)
Deprecated: Use SectorIDResponse.ProtoReflect.Descriptor instead.
func (*SectorIDResponse) GetAnswer ¶
func (x *SectorIDResponse) GetAnswer() uint64
func (*SectorIDResponse) ProtoMessage ¶
func (*SectorIDResponse) ProtoMessage()
func (*SectorIDResponse) ProtoReflect ¶
func (x *SectorIDResponse) ProtoReflect() protoreflect.Message
func (*SectorIDResponse) Reset ¶
func (x *SectorIDResponse) Reset()
func (*SectorIDResponse) String ¶
func (x *SectorIDResponse) String() string
type UnimplementedGrpcServer ¶
type UnimplementedGrpcServer struct { }
UnimplementedGrpcServer can be embedded to have forward compatible implementations.
func (*UnimplementedGrpcServer) GetHeight ¶
func (*UnimplementedGrpcServer) GetHeight(context.Context, *HeightRequest) (*HeightResponse, error)
func (*UnimplementedGrpcServer) GetSectorID ¶
func (*UnimplementedGrpcServer) GetSectorID(context.Context, *SectorIDRequest) (*SectorIDResponse, error)
Click to show internal directories.
Click to hide internal directories.