powergate: github.com/textileio/powergate/index/miner/rpc Index | Files

package rpc

import "github.com/textileio/powergate/index/miner/rpc"

Index

Package Files

rpc.go rpc.pb.go

Variables

var File_index_miner_rpc_rpc_proto protoreflect.FileDescriptor

func RegisterRPCServiceServer Uses

func RegisterRPCServiceServer(s *grpc.Server, srv RPCServiceServer)

type GetRequest Uses

type GetRequest struct {
    // contains filtered or unexported fields
}

func (*GetRequest) Descriptor Uses

func (*GetRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) ProtoMessage Uses

func (*GetRequest) ProtoMessage()

func (*GetRequest) ProtoReflect Uses

func (x *GetRequest) ProtoReflect() protoreflect.Message

func (*GetRequest) Reset Uses

func (x *GetRequest) Reset()

func (*GetRequest) String Uses

func (x *GetRequest) String() string

type GetResponse Uses

type GetResponse struct {
    Index *Index `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"`
    // contains filtered or unexported fields
}

func (*GetResponse) Descriptor Uses

func (*GetResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.

func (*GetResponse) GetIndex Uses

func (x *GetResponse) GetIndex() *Index

func (*GetResponse) ProtoMessage Uses

func (*GetResponse) ProtoMessage()

func (*GetResponse) ProtoReflect Uses

func (x *GetResponse) ProtoReflect() protoreflect.Message

func (*GetResponse) Reset Uses

func (x *GetResponse) Reset()

func (*GetResponse) String Uses

func (x *GetResponse) String() string

type Index Uses

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 Uses

func (*Index) Descriptor() ([]byte, []int)

Deprecated: Use Index.ProtoReflect.Descriptor instead.

func (*Index) GetChain Uses

func (x *Index) GetChain() *OnChainIndex

func (*Index) GetMeta Uses

func (x *Index) GetMeta() *MetaIndex

func (*Index) ProtoMessage Uses

func (*Index) ProtoMessage()

func (*Index) ProtoReflect Uses

func (x *Index) ProtoReflect() protoreflect.Message

func (*Index) Reset Uses

func (x *Index) Reset()

func (*Index) String Uses

func (x *Index) String() string

type Location Uses

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 Uses

func (*Location) Descriptor() ([]byte, []int)

Deprecated: Use Location.ProtoReflect.Descriptor instead.

func (*Location) GetCountry Uses

func (x *Location) GetCountry() string

func (*Location) GetLatitude Uses

func (x *Location) GetLatitude() float64

func (*Location) GetLongitude Uses

func (x *Location) GetLongitude() float64

func (*Location) ProtoMessage Uses

func (*Location) ProtoMessage()

func (*Location) ProtoReflect Uses

func (x *Location) ProtoReflect() protoreflect.Message

func (*Location) Reset Uses

func (x *Location) Reset()

func (*Location) String Uses

func (x *Location) String() string

type Meta Uses

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 Uses

func (*Meta) Descriptor() ([]byte, []int)

Deprecated: Use Meta.ProtoReflect.Descriptor instead.

func (*Meta) GetLastUpdated Uses

func (x *Meta) GetLastUpdated() int64

func (*Meta) GetLocation Uses

func (x *Meta) GetLocation() *Location

func (*Meta) GetOnline Uses

func (x *Meta) GetOnline() bool

func (*Meta) GetUserAgent Uses

func (x *Meta) GetUserAgent() string

func (*Meta) ProtoMessage Uses

func (*Meta) ProtoMessage()

func (*Meta) ProtoReflect Uses

func (x *Meta) ProtoReflect() protoreflect.Message

func (*Meta) Reset Uses

func (x *Meta) Reset()

func (*Meta) String Uses

func (x *Meta) String() string

type MetaIndex Uses

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 `protobuf:"bytes,3,rep,name=info,proto3" json:"info,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    // contains filtered or unexported fields
}

func (*MetaIndex) Descriptor Uses

func (*MetaIndex) Descriptor() ([]byte, []int)

Deprecated: Use MetaIndex.ProtoReflect.Descriptor instead.

func (*MetaIndex) GetInfo Uses

func (x *MetaIndex) GetInfo() map[string]*Meta

func (*MetaIndex) GetOffline Uses

func (x *MetaIndex) GetOffline() uint32

func (*MetaIndex) GetOnline Uses

func (x *MetaIndex) GetOnline() uint32

func (*MetaIndex) ProtoMessage Uses

func (*MetaIndex) ProtoMessage()

func (*MetaIndex) ProtoReflect Uses

func (x *MetaIndex) ProtoReflect() protoreflect.Message

func (*MetaIndex) Reset Uses

func (x *MetaIndex) Reset()

func (*MetaIndex) String Uses

func (x *MetaIndex) String() string

type OnChainData Uses

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 Uses

func (*OnChainData) Descriptor() ([]byte, []int)

Deprecated: Use OnChainData.ProtoReflect.Descriptor instead.

func (*OnChainData) GetActiveDeals Uses

func (x *OnChainData) GetActiveDeals() uint64

func (*OnChainData) GetPower Uses

func (x *OnChainData) GetPower() uint64

func (*OnChainData) GetRelativePower Uses

func (x *OnChainData) GetRelativePower() float32

func (*OnChainData) GetSectorSize Uses

func (x *OnChainData) GetSectorSize() uint64

func (*OnChainData) ProtoMessage Uses

func (*OnChainData) ProtoMessage()

func (*OnChainData) ProtoReflect Uses

func (x *OnChainData) ProtoReflect() protoreflect.Message

func (*OnChainData) Reset Uses

func (x *OnChainData) Reset()

func (*OnChainData) String Uses

func (x *OnChainData) String() string

type OnChainIndex Uses

type OnChainIndex struct {
    LastUpdated int64                   `protobuf:"varint,1,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"`
    Miners      map[string]*OnChainData `protobuf:"bytes,2,rep,name=miners,proto3" json:"miners,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    // contains filtered or unexported fields
}

func (*OnChainIndex) Descriptor Uses

func (*OnChainIndex) Descriptor() ([]byte, []int)

Deprecated: Use OnChainIndex.ProtoReflect.Descriptor instead.

func (*OnChainIndex) GetLastUpdated Uses

func (x *OnChainIndex) GetLastUpdated() int64

func (*OnChainIndex) GetMiners Uses

func (x *OnChainIndex) GetMiners() map[string]*OnChainData

func (*OnChainIndex) ProtoMessage Uses

func (*OnChainIndex) ProtoMessage()

func (*OnChainIndex) ProtoReflect Uses

func (x *OnChainIndex) ProtoReflect() protoreflect.Message

func (*OnChainIndex) Reset Uses

func (x *OnChainIndex) Reset()

func (*OnChainIndex) String Uses

func (x *OnChainIndex) String() string

type RPC Uses

type RPC struct {
    UnimplementedRPCServiceServer
    // contains filtered or unexported fields
}

RPC implements the gprc service.

func New Uses

func New(mi miner.Module) *RPC

New creates a new rpc service.

func (*RPC) Get Uses

func (s *RPC) Get(ctx context.Context, req *GetRequest) (*GetResponse, error)

Get calls miner index Get.

type RPCServiceClient Uses

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 Uses

func NewRPCServiceClient(cc grpc.ClientConnInterface) RPCServiceClient

type RPCServiceServer Uses

type RPCServiceServer interface {
    Get(context.Context, *GetRequest) (*GetResponse, error)
}

RPCServiceServer is the server API for RPCService service.

type UnimplementedRPCServiceServer Uses

type UnimplementedRPCServiceServer struct {
}

UnimplementedRPCServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedRPCServiceServer) Get Uses

func (*UnimplementedRPCServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error)

Package rpc imports 10 packages (graph) and is imported by 6 packages. Updated 2020-09-21. Refresh now. Tools for package owners.