Documentation ¶
Index ¶
- Variables
- func RegisterRPCServiceServer(s *grpc.Server, srv RPCServiceServer)
- type GetRequest
- type GetResponse
- type Index
- type Location
- func (*Location) Descriptor() ([]byte, []int)deprecated
- func (x *Location) GetCountry() string
- func (x *Location) GetLatitude() float64
- func (x *Location) GetLongitude() float64
- func (*Location) ProtoMessage()
- func (x *Location) ProtoReflect() protoreflect.Message
- func (x *Location) Reset()
- func (x *Location) String() string
- type Meta
- func (*Meta) Descriptor() ([]byte, []int)deprecated
- func (x *Meta) GetLastUpdated() int64
- func (x *Meta) GetLocation() *Location
- func (x *Meta) GetOnline() bool
- func (x *Meta) GetUserAgent() string
- func (*Meta) ProtoMessage()
- func (x *Meta) ProtoReflect() protoreflect.Message
- func (x *Meta) Reset()
- func (x *Meta) String() string
- type MetaIndex
- func (*MetaIndex) Descriptor() ([]byte, []int)deprecated
- func (x *MetaIndex) GetInfo() map[string]*Meta
- func (x *MetaIndex) GetOffline() uint32
- func (x *MetaIndex) GetOnline() uint32
- func (*MetaIndex) ProtoMessage()
- func (x *MetaIndex) ProtoReflect() protoreflect.Message
- func (x *MetaIndex) Reset()
- func (x *MetaIndex) String() string
- type OnChainData
- func (*OnChainData) Descriptor() ([]byte, []int)deprecated
- func (x *OnChainData) GetActiveDeals() uint64
- func (x *OnChainData) GetPower() uint64
- func (x *OnChainData) GetRelativePower() float32
- func (x *OnChainData) GetSectorSize() uint64
- func (*OnChainData) ProtoMessage()
- func (x *OnChainData) ProtoReflect() protoreflect.Message
- func (x *OnChainData) Reset()
- func (x *OnChainData) String() string
- type OnChainIndex
- func (*OnChainIndex) Descriptor() ([]byte, []int)deprecated
- func (x *OnChainIndex) GetLastUpdated() int64
- func (x *OnChainIndex) GetMiners() map[string]*OnChainData
- func (*OnChainIndex) ProtoMessage()
- func (x *OnChainIndex) ProtoReflect() protoreflect.Message
- func (x *OnChainIndex) Reset()
- func (x *OnChainIndex) String() string
- type RPC
- type RPCServiceClient
- type RPCServiceServer
- type UnimplementedRPCServiceServer
Constants ¶
This section is empty.
Variables ¶
View Source
var File_index_miner_rpc_rpc_proto protoreflect.FileDescriptor
Functions ¶
func RegisterRPCServiceServer ¶
func RegisterRPCServiceServer(s *grpc.Server, srv RPCServiceServer)
Types ¶
type GetRequest ¶
type GetRequest struct {
// contains filtered or unexported fields
}
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) ProtoReflect ¶
func (x *GetRequest) ProtoReflect() protoreflect.Message
func (*GetRequest) Reset ¶
func (x *GetRequest) Reset()
func (*GetRequest) String ¶
func (x *GetRequest) String() string
type GetResponse ¶
type GetResponse struct { Index *Index `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` // contains filtered or unexported fields }
func (*GetResponse) Descriptor
deprecated
func (*GetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) GetIndex ¶
func (x *GetResponse) GetIndex() *Index
func (*GetResponse) ProtoMessage ¶
func (*GetResponse) ProtoMessage()
func (*GetResponse) ProtoReflect ¶
func (x *GetResponse) ProtoReflect() protoreflect.Message
func (*GetResponse) Reset ¶
func (x *GetResponse) Reset()
func (*GetResponse) String ¶
func (x *GetResponse) String() string
type Index ¶
type Index struct { Meta *MetaIndex `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` Chain *OnChainIndex `protobuf:"bytes,2,opt,name=chain,proto3" json:"chain,omitempty"` // contains filtered or unexported fields }
func (*Index) Descriptor
deprecated
func (*Index) GetChain ¶
func (x *Index) GetChain() *OnChainIndex
func (*Index) ProtoMessage ¶
func (*Index) ProtoMessage()
func (*Index) ProtoReflect ¶
func (x *Index) ProtoReflect() protoreflect.Message
type Location ¶
type Location struct { Country string `protobuf:"bytes,1,opt,name=country,proto3" json:"country,omitempty"` Longitude float64 `protobuf:"fixed64,2,opt,name=longitude,proto3" json:"longitude,omitempty"` Latitude float64 `protobuf:"fixed64,3,opt,name=latitude,proto3" json:"latitude,omitempty"` // contains filtered or unexported fields }
func (*Location) Descriptor
deprecated
func (*Location) GetCountry ¶
func (*Location) GetLatitude ¶
func (*Location) GetLongitude ¶
func (*Location) ProtoMessage ¶
func (*Location) ProtoMessage()
func (*Location) ProtoReflect ¶
func (x *Location) ProtoReflect() protoreflect.Message
type Meta ¶
type Meta struct { LastUpdated int64 `protobuf:"varint,1,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` UserAgent string `protobuf:"bytes,2,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"` Location *Location `protobuf:"bytes,3,opt,name=location,proto3" json:"location,omitempty"` Online bool `protobuf:"varint,4,opt,name=online,proto3" json:"online,omitempty"` // contains filtered or unexported fields }
func (*Meta) Descriptor
deprecated
func (*Meta) GetLastUpdated ¶
func (*Meta) GetLocation ¶
func (*Meta) GetUserAgent ¶
func (*Meta) ProtoMessage ¶
func (*Meta) ProtoMessage()
func (*Meta) ProtoReflect ¶
func (x *Meta) ProtoReflect() protoreflect.Message
type MetaIndex ¶
type MetaIndex struct { Online uint32 `protobuf:"varint,1,opt,name=online,proto3" json:"online,omitempty"` Offline uint32 `protobuf:"varint,2,opt,name=offline,proto3" json:"offline,omitempty"` Info map[string]*Meta `` /* 149-byte string literal not displayed */ // contains filtered or unexported fields }
func (*MetaIndex) Descriptor
deprecated
func (*MetaIndex) GetOffline ¶
func (*MetaIndex) ProtoMessage ¶
func (*MetaIndex) ProtoMessage()
func (*MetaIndex) ProtoReflect ¶
func (x *MetaIndex) ProtoReflect() protoreflect.Message
type OnChainData ¶
type OnChainData struct { Power uint64 `protobuf:"varint,1,opt,name=power,proto3" json:"power,omitempty"` RelativePower float32 `protobuf:"fixed32,2,opt,name=relative_power,json=relativePower,proto3" json:"relative_power,omitempty"` SectorSize uint64 `protobuf:"varint,3,opt,name=sector_size,json=sectorSize,proto3" json:"sector_size,omitempty"` ActiveDeals uint64 `protobuf:"varint,4,opt,name=active_deals,json=activeDeals,proto3" json:"active_deals,omitempty"` // contains filtered or unexported fields }
func (*OnChainData) Descriptor
deprecated
func (*OnChainData) Descriptor() ([]byte, []int)
Deprecated: Use OnChainData.ProtoReflect.Descriptor instead.
func (*OnChainData) GetActiveDeals ¶
func (x *OnChainData) GetActiveDeals() uint64
func (*OnChainData) GetPower ¶
func (x *OnChainData) GetPower() uint64
func (*OnChainData) GetRelativePower ¶
func (x *OnChainData) GetRelativePower() float32
func (*OnChainData) GetSectorSize ¶
func (x *OnChainData) GetSectorSize() uint64
func (*OnChainData) ProtoMessage ¶
func (*OnChainData) ProtoMessage()
func (*OnChainData) ProtoReflect ¶
func (x *OnChainData) ProtoReflect() protoreflect.Message
func (*OnChainData) Reset ¶
func (x *OnChainData) Reset()
func (*OnChainData) String ¶
func (x *OnChainData) String() string
type OnChainIndex ¶
type OnChainIndex struct { LastUpdated int64 `protobuf:"varint,1,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` Miners map[string]*OnChainData `` /* 153-byte string literal not displayed */ // contains filtered or unexported fields }
func (*OnChainIndex) Descriptor
deprecated
func (*OnChainIndex) Descriptor() ([]byte, []int)
Deprecated: Use OnChainIndex.ProtoReflect.Descriptor instead.
func (*OnChainIndex) GetLastUpdated ¶
func (x *OnChainIndex) GetLastUpdated() int64
func (*OnChainIndex) GetMiners ¶
func (x *OnChainIndex) GetMiners() map[string]*OnChainData
func (*OnChainIndex) ProtoMessage ¶
func (*OnChainIndex) ProtoMessage()
func (*OnChainIndex) ProtoReflect ¶
func (x *OnChainIndex) ProtoReflect() protoreflect.Message
func (*OnChainIndex) Reset ¶
func (x *OnChainIndex) Reset()
func (*OnChainIndex) String ¶
func (x *OnChainIndex) String() string
type RPC ¶
type RPC struct { UnimplementedRPCServiceServer // contains filtered or unexported fields }
RPC implements the gprc service.
func (*RPC) Get ¶
func (s *RPC) Get(ctx context.Context, req *GetRequest) (*GetResponse, error)
Get calls miner index Get.
type RPCServiceClient ¶
type RPCServiceClient interface {
Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
}
RPCServiceClient is the client API for RPCService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewRPCServiceClient ¶
func NewRPCServiceClient(cc grpc.ClientConnInterface) RPCServiceClient
type RPCServiceServer ¶
type RPCServiceServer interface {
Get(context.Context, *GetRequest) (*GetResponse, error)
}
RPCServiceServer is the server API for RPCService service.
type UnimplementedRPCServiceServer ¶
type UnimplementedRPCServiceServer struct { }
UnimplementedRPCServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedRPCServiceServer) Get ¶
func (*UnimplementedRPCServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error)
Click to show internal directories.
Click to hide internal directories.