Documentation ¶
Index ¶
- Variables
- func RegisterRPCServer(s *grpc.Server, srv RPCServer)
- type ChainIndex
- func (*ChainIndex) Descriptor() ([]byte, []int)deprecated
- func (x *ChainIndex) GetLastUpdated() int64
- func (x *ChainIndex) GetPower() map[string]*Power
- func (*ChainIndex) ProtoMessage()
- func (x *ChainIndex) ProtoReflect() protoreflect.Message
- func (x *ChainIndex) Reset()
- func (x *ChainIndex) String() string
- type GetReply
- type GetRequest
- type Index
- type Location
- func (*Location) Descriptor() ([]byte, []int)deprecated
- func (x *Location) GetCountry() string
- func (x *Location) GetLatitude() float32
- func (x *Location) GetLongitude() float32
- 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 Power
- type RPC
- type RPCClient
- type RPCServer
- type UnimplementedRPCServer
Constants ¶
This section is empty.
Variables ¶
View Source
var File_index_miner_rpc_rpc_proto protoreflect.FileDescriptor
Functions ¶
func RegisterRPCServer ¶
Types ¶
type ChainIndex ¶
type ChainIndex struct { LastUpdated int64 `protobuf:"varint,1,opt,name=lastUpdated,proto3" json:"lastUpdated,omitempty"` Power map[string]*Power `` /* 151-byte string literal not displayed */ // contains filtered or unexported fields }
func (*ChainIndex) Descriptor
deprecated
func (*ChainIndex) Descriptor() ([]byte, []int)
Deprecated: Use ChainIndex.ProtoReflect.Descriptor instead.
func (*ChainIndex) GetLastUpdated ¶
func (x *ChainIndex) GetLastUpdated() int64
func (*ChainIndex) GetPower ¶
func (x *ChainIndex) GetPower() map[string]*Power
func (*ChainIndex) ProtoMessage ¶
func (*ChainIndex) ProtoMessage()
func (*ChainIndex) ProtoReflect ¶
func (x *ChainIndex) ProtoReflect() protoreflect.Message
func (*ChainIndex) Reset ¶
func (x *ChainIndex) Reset()
func (*ChainIndex) String ¶
func (x *ChainIndex) String() string
type GetReply ¶
type GetReply struct { Index *Index `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` // contains filtered or unexported fields }
func (*GetReply) Descriptor
deprecated
func (*GetReply) ProtoMessage ¶
func (*GetReply) ProtoMessage()
func (*GetReply) ProtoReflect ¶
func (x *GetReply) ProtoReflect() protoreflect.Message
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 Index ¶
type Index struct { Meta *MetaIndex `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` Chain *ChainIndex `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() *ChainIndex
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 float32 `protobuf:"fixed32,2,opt,name=longitude,proto3" json:"longitude,omitempty"` Latitude float32 `protobuf:"fixed32,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=lastUpdated,proto3" json:"lastUpdated,omitempty"` UserAgent string `protobuf:"bytes,2,opt,name=userAgent,proto3" json:"userAgent,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 Power ¶
type Power struct { Power uint64 `protobuf:"varint,1,opt,name=power,proto3" json:"power,omitempty"` Relative float32 `protobuf:"fixed32,2,opt,name=relative,proto3" json:"relative,omitempty"` // contains filtered or unexported fields }
func (*Power) Descriptor
deprecated
func (*Power) GetRelative ¶
func (*Power) ProtoMessage ¶
func (*Power) ProtoMessage()
func (*Power) ProtoReflect ¶
func (x *Power) ProtoReflect() protoreflect.Message
type RPC ¶
type RPC struct { UnimplementedRPCServer // contains filtered or unexported fields }
RPC implements the gprc service
type RPCClient ¶
type RPCClient interface {
Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetReply, error)
}
RPCClient is the client API for RPC service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewRPCClient ¶
func NewRPCClient(cc grpc.ClientConnInterface) RPCClient
type RPCServer ¶
type RPCServer interface {
Get(context.Context, *GetRequest) (*GetReply, error)
}
RPCServer is the server API for RPC service.
type UnimplementedRPCServer ¶
type UnimplementedRPCServer struct { }
UnimplementedRPCServer can be embedded to have forward compatible implementations.
func (*UnimplementedRPCServer) Get ¶
func (*UnimplementedRPCServer) Get(context.Context, *GetRequest) (*GetReply, error)
Click to show internal directories.
Click to hide internal directories.