powergate: github.com/textileio/powergate/reputation/rpc Index | Files

package rpc

import "github.com/textileio/powergate/reputation/rpc"

Index

Package Files

rpc.go rpc.pb.go

Variables

var File_reputation_rpc_rpc_proto protoreflect.FileDescriptor

func RegisterRPCServiceServer Uses

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

type AddSourceRequest Uses

type AddSourceRequest struct {
    Id    string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
    Maddr string `protobuf:"bytes,2,opt,name=maddr,proto3" json:"maddr,omitempty"`
    // contains filtered or unexported fields
}

func (*AddSourceRequest) Descriptor Uses

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

Deprecated: Use AddSourceRequest.ProtoReflect.Descriptor instead.

func (*AddSourceRequest) GetId Uses

func (x *AddSourceRequest) GetId() string

func (*AddSourceRequest) GetMaddr Uses

func (x *AddSourceRequest) GetMaddr() string

func (*AddSourceRequest) ProtoMessage Uses

func (*AddSourceRequest) ProtoMessage()

func (*AddSourceRequest) ProtoReflect Uses

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

func (*AddSourceRequest) Reset Uses

func (x *AddSourceRequest) Reset()

func (*AddSourceRequest) String Uses

func (x *AddSourceRequest) String() string

type AddSourceResponse Uses

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

func (*AddSourceResponse) Descriptor Uses

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

Deprecated: Use AddSourceResponse.ProtoReflect.Descriptor instead.

func (*AddSourceResponse) ProtoMessage Uses

func (*AddSourceResponse) ProtoMessage()

func (*AddSourceResponse) ProtoReflect Uses

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

func (*AddSourceResponse) Reset Uses

func (x *AddSourceResponse) Reset()

func (*AddSourceResponse) String Uses

func (x *AddSourceResponse) String() string

type GetTopMinersRequest Uses

type GetTopMinersRequest struct {
    Limit int32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
    // contains filtered or unexported fields
}

func (*GetTopMinersRequest) Descriptor Uses

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

Deprecated: Use GetTopMinersRequest.ProtoReflect.Descriptor instead.

func (*GetTopMinersRequest) GetLimit Uses

func (x *GetTopMinersRequest) GetLimit() int32

func (*GetTopMinersRequest) ProtoMessage Uses

func (*GetTopMinersRequest) ProtoMessage()

func (*GetTopMinersRequest) ProtoReflect Uses

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

func (*GetTopMinersRequest) Reset Uses

func (x *GetTopMinersRequest) Reset()

func (*GetTopMinersRequest) String Uses

func (x *GetTopMinersRequest) String() string

type GetTopMinersResponse Uses

type GetTopMinersResponse struct {
    TopMiners []*MinerScore `protobuf:"bytes,1,rep,name=top_miners,json=topMiners,proto3" json:"top_miners,omitempty"`
    // contains filtered or unexported fields
}

func (*GetTopMinersResponse) Descriptor Uses

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

Deprecated: Use GetTopMinersResponse.ProtoReflect.Descriptor instead.

func (*GetTopMinersResponse) GetTopMiners Uses

func (x *GetTopMinersResponse) GetTopMiners() []*MinerScore

func (*GetTopMinersResponse) ProtoMessage Uses

func (*GetTopMinersResponse) ProtoMessage()

func (*GetTopMinersResponse) ProtoReflect Uses

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

func (*GetTopMinersResponse) Reset Uses

func (x *GetTopMinersResponse) Reset()

func (*GetTopMinersResponse) String Uses

func (x *GetTopMinersResponse) String() string

type MinerScore Uses

type MinerScore struct {
    Addr  string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
    Score int32  `protobuf:"varint,2,opt,name=score,proto3" json:"score,omitempty"`
    // contains filtered or unexported fields
}

func (*MinerScore) Descriptor Uses

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

Deprecated: Use MinerScore.ProtoReflect.Descriptor instead.

func (*MinerScore) GetAddr Uses

func (x *MinerScore) GetAddr() string

func (*MinerScore) GetScore Uses

func (x *MinerScore) GetScore() int32

func (*MinerScore) ProtoMessage Uses

func (*MinerScore) ProtoMessage()

func (*MinerScore) ProtoReflect Uses

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

func (*MinerScore) Reset Uses

func (x *MinerScore) Reset()

func (*MinerScore) String Uses

func (x *MinerScore) String() string

type RPC Uses

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

RPC implements the gprc service.

func New Uses

func New(m *reputation.Module) *RPC

New creates a new rpc service.

func (*RPC) AddSource Uses

func (s *RPC) AddSource(ctx context.Context, req *AddSourceRequest) (*AddSourceResponse, error)

AddSource calls Module.AddSource.

func (*RPC) GetTopMiners Uses

func (s *RPC) GetTopMiners(ctx context.Context, req *GetTopMinersRequest) (*GetTopMinersResponse, error)

GetTopMiners calls Module.GetTopMiners.

type RPCServiceClient Uses

type RPCServiceClient interface {
    AddSource(ctx context.Context, in *AddSourceRequest, opts ...grpc.CallOption) (*AddSourceResponse, error)
    GetTopMiners(ctx context.Context, in *GetTopMinersRequest, opts ...grpc.CallOption) (*GetTopMinersResponse, 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 {
    AddSource(context.Context, *AddSourceRequest) (*AddSourceResponse, error)
    GetTopMiners(context.Context, *GetTopMinersRequest) (*GetTopMinersResponse, 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) AddSource Uses

func (*UnimplementedRPCServiceServer) AddSource(context.Context, *AddSourceRequest) (*AddSourceResponse, error)

func (*UnimplementedRPCServiceServer) GetTopMiners Uses

func (*UnimplementedRPCServiceServer) GetTopMiners(context.Context, *GetTopMinersRequest) (*GetTopMinersResponse, error)

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