|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
|
|
// source: beaconchain.proto
|
|
|
|
|
|
|
|
package beaconchain
|
|
|
|
|
|
|
|
import (
|
|
|
|
context "context"
|
|
|
|
fmt "fmt"
|
|
|
|
proto "github.com/golang/protobuf/proto"
|
|
|
|
grpc "google.golang.org/grpc"
|
|
|
|
math "math"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ = proto.Marshal
|
|
|
|
var _ = fmt.Errorf
|
|
|
|
var _ = math.Inf
|
|
|
|
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
// is compatible with the proto package it is being compiled against.
|
|
|
|
// A compilation error at this line likely means your copy of the
|
|
|
|
// proto package needs to be updated.
|
|
|
|
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
|
|
|
|
// FetchLeadersRequest is the request to fetch the current leaders.
|
|
|
|
type FetchLeadersRequest struct {
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *FetchLeadersRequest) Reset() { *m = FetchLeadersRequest{} }
|
|
|
|
func (m *FetchLeadersRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*FetchLeadersRequest) ProtoMessage() {}
|
|
|
|
func (*FetchLeadersRequest) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_474fd8061d1037cf, []int{0}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *FetchLeadersRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_FetchLeadersRequest.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *FetchLeadersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_FetchLeadersRequest.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (m *FetchLeadersRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_FetchLeadersRequest.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *FetchLeadersRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_FetchLeadersRequest.Size(m)
|
|
|
|
}
|
|
|
|
func (m *FetchLeadersRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_FetchLeadersRequest.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_FetchLeadersRequest proto.InternalMessageInfo
|
|
|
|
|
|
|
|
// FetchLeadersResponse is the response of FetchLeadersRequest.
|
|
|
|
type FetchLeadersResponse struct {
|
|
|
|
Leaders []*FetchLeadersResponse_Leader `protobuf:"bytes,1,rep,name=leaders,proto3" json:"leaders,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *FetchLeadersResponse) Reset() { *m = FetchLeadersResponse{} }
|
|
|
|
func (m *FetchLeadersResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*FetchLeadersResponse) ProtoMessage() {}
|
|
|
|
func (*FetchLeadersResponse) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_474fd8061d1037cf, []int{1}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *FetchLeadersResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_FetchLeadersResponse.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *FetchLeadersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_FetchLeadersResponse.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (m *FetchLeadersResponse) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_FetchLeadersResponse.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *FetchLeadersResponse) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_FetchLeadersResponse.Size(m)
|
|
|
|
}
|
|
|
|
func (m *FetchLeadersResponse) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_FetchLeadersResponse.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_FetchLeadersResponse proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *FetchLeadersResponse) GetLeaders() []*FetchLeadersResponse_Leader {
|
|
|
|
if m != nil {
|
|
|
|
return m.Leaders
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type FetchLeadersResponse_Leader struct {
|
|
|
|
Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
|
|
|
|
Port string `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"`
|
|
|
|
ShardId uint32 `protobuf:"varint,3,opt,name=shardId,proto3" json:"shardId,omitempty"`
|
|
|
|
PeerID string `protobuf:"bytes,4,opt,name=peerID,proto3" json:"peerID,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *FetchLeadersResponse_Leader) Reset() { *m = FetchLeadersResponse_Leader{} }
|
|
|
|
func (m *FetchLeadersResponse_Leader) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*FetchLeadersResponse_Leader) ProtoMessage() {}
|
|
|
|
func (*FetchLeadersResponse_Leader) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_474fd8061d1037cf, []int{1, 0}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *FetchLeadersResponse_Leader) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_FetchLeadersResponse_Leader.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *FetchLeadersResponse_Leader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_FetchLeadersResponse_Leader.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (m *FetchLeadersResponse_Leader) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_FetchLeadersResponse_Leader.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *FetchLeadersResponse_Leader) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_FetchLeadersResponse_Leader.Size(m)
|
|
|
|
}
|
|
|
|
func (m *FetchLeadersResponse_Leader) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_FetchLeadersResponse_Leader.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_FetchLeadersResponse_Leader proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *FetchLeadersResponse_Leader) GetIp() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Ip
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *FetchLeadersResponse_Leader) GetPort() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Port
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *FetchLeadersResponse_Leader) GetShardId() uint32 {
|
|
|
|
if m != nil {
|
|
|
|
return m.ShardId
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *FetchLeadersResponse_Leader) GetPeerID() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.PeerID
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
proto.RegisterType((*FetchLeadersRequest)(nil), "beaconchain.FetchLeadersRequest")
|
|
|
|
proto.RegisterType((*FetchLeadersResponse)(nil), "beaconchain.FetchLeadersResponse")
|
|
|
|
proto.RegisterType((*FetchLeadersResponse_Leader)(nil), "beaconchain.FetchLeadersResponse.Leader")
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() { proto.RegisterFile("beaconchain.proto", fileDescriptor_474fd8061d1037cf) }
|
|
|
|
|
|
|
|
var fileDescriptor_474fd8061d1037cf = []byte{
|
|
|
|
// 222 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x90, 0xcd, 0x4a, 0xc4, 0x30,
|
|
|
|
0x14, 0x85, 0x4d, 0x67, 0xe8, 0xe0, 0x1d, 0x15, 0xbc, 0xfe, 0x10, 0x66, 0x15, 0xbb, 0xca, 0xaa,
|
|
|
|
0x8b, 0xf1, 0x0d, 0xaa, 0x08, 0x05, 0x57, 0x11, 0xb7, 0x42, 0x9a, 0x5e, 0x68, 0x50, 0x9a, 0x98,
|
|
|
|
0x44, 0x1f, 0xce, 0xa7, 0x13, 0x53, 0x0b, 0x15, 0x44, 0x77, 0x39, 0x1f, 0x39, 0xe4, 0xcb, 0x81,
|
|
|
|
0xd3, 0x8e, 0xb4, 0x71, 0xa3, 0x19, 0xb4, 0x1d, 0x6b, 0x1f, 0x5c, 0x72, 0xb8, 0x5d, 0xa0, 0xea,
|
|
|
|
0x02, 0xce, 0xee, 0x28, 0x99, 0xe1, 0x9e, 0x74, 0x4f, 0x21, 0x2a, 0x7a, 0x7d, 0xa3, 0x98, 0xaa,
|
|
|
|
0x0f, 0x06, 0xe7, 0x3f, 0x79, 0xf4, 0x6e, 0x8c, 0x84, 0x0d, 0x6c, 0x5e, 0x26, 0xc4, 0x99, 0x58,
|
|
|
|
0xc9, 0xed, 0x5e, 0xd6, 0xcb, 0x17, 0x7e, 0xeb, 0xd4, 0x53, 0x56, 0x73, 0x71, 0xf7, 0x04, 0xe5,
|
|
|
|
0x84, 0xf0, 0x04, 0x0a, 0xeb, 0x39, 0x13, 0x4c, 0x1e, 0xaa, 0xc2, 0x7a, 0x44, 0x58, 0x7b, 0x17,
|
|
|
|
0x12, 0x2f, 0x32, 0xc9, 0x67, 0xe4, 0xb0, 0x89, 0x83, 0x0e, 0x7d, 0xdb, 0xf3, 0x95, 0x60, 0xf2,
|
|
|
|
0x58, 0xcd, 0x11, 0x2f, 0xa1, 0xf4, 0x44, 0xa1, 0xbd, 0xe5, 0xeb, 0x7c, 0xff, 0x3b, 0xed, 0x9f,
|
|
|
|
0x01, 0x9b, 0xec, 0x74, 0xf3, 0xe5, 0xf4, 0x40, 0xe1, 0xdd, 0x1a, 0xc2, 0x47, 0x38, 0x5a, 0xda,
|
|
|
|
0xa1, 0xf8, 0x43, 0x3c, 0x8f, 0xb0, 0xbb, 0xfa, 0xf7, 0x6b, 0xd5, 0x41, 0x57, 0xe6, 0x51, 0xaf,
|
|
|
|
0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x35, 0x50, 0x26, 0x86, 0x69, 0x01, 0x00, 0x00,
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ context.Context
|
|
|
|
var _ grpc.ClientConn
|
|
|
|
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
// is compatible with the grpc package it is being compiled against.
|
|
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
|
|
|
|
// BeaconChainServiceClient is the client API for BeaconChainService service.
|
|
|
|
//
|
|
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
|
|
type BeaconChainServiceClient interface {
|
|
|
|
FetchLeaders(ctx context.Context, in *FetchLeadersRequest, opts ...grpc.CallOption) (*FetchLeadersResponse, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
type beaconChainServiceClient struct {
|
|
|
|
cc *grpc.ClientConn
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewBeaconChainServiceClient(cc *grpc.ClientConn) BeaconChainServiceClient {
|
|
|
|
return &beaconChainServiceClient{cc}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *beaconChainServiceClient) FetchLeaders(ctx context.Context, in *FetchLeadersRequest, opts ...grpc.CallOption) (*FetchLeadersResponse, error) {
|
|
|
|
out := new(FetchLeadersResponse)
|
|
|
|
err := c.cc.Invoke(ctx, "/beaconchain.BeaconChainService/FetchLeaders", in, out, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// BeaconChainServiceServer is the server API for BeaconChainService service.
|
|
|
|
type BeaconChainServiceServer interface {
|
|
|
|
FetchLeaders(context.Context, *FetchLeadersRequest) (*FetchLeadersResponse, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
func RegisterBeaconChainServiceServer(s *grpc.Server, srv BeaconChainServiceServer) {
|
|
|
|
s.RegisterService(&_BeaconChainService_serviceDesc, srv)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _BeaconChainService_FetchLeaders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(FetchLeadersRequest)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(BeaconChainServiceServer).FetchLeaders(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/beaconchain.BeaconChainService/FetchLeaders",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(BeaconChainServiceServer).FetchLeaders(ctx, req.(*FetchLeadersRequest))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
|
|
|
var _BeaconChainService_serviceDesc = grpc.ServiceDesc{
|
|
|
|
ServiceName: "beaconchain.BeaconChainService",
|
|
|
|
HandlerType: (*BeaconChainServiceServer)(nil),
|
|
|
|
Methods: []grpc.MethodDesc{
|
|
|
|
{
|
|
|
|
MethodName: "FetchLeaders",
|
|
|
|
Handler: _BeaconChainService_FetchLeaders_Handler,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Streams: []grpc.StreamDesc{},
|
|
|
|
Metadata: "beaconchain.proto",
|
|
|
|
}
|