rpc

package
v0.0.1-beta.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_index_slashing_rpc_rpc_proto protoreflect.FileDescriptor

Functions

func RegisterRPCServer

func RegisterRPCServer(s *grpc.Server, srv RPCServer)

Types

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) Descriptor() ([]byte, []int)

Deprecated: Use GetReply.ProtoReflect.Descriptor instead.

func (*GetReply) GetIndex

func (x *GetReply) GetIndex() *Index

func (*GetReply) ProtoMessage

func (*GetReply) ProtoMessage()

func (*GetReply) ProtoReflect

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

func (*GetReply) Reset

func (x *GetReply) Reset()

func (*GetReply) String

func (x *GetReply) String() string

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 {
	TipSetKey string              `protobuf:"bytes,1,opt,name=tipSetKey,proto3" json:"tipSetKey,omitempty"`
	Miners    map[string]*Slashes `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Index) Descriptor deprecated

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

Deprecated: Use Index.ProtoReflect.Descriptor instead.

func (*Index) GetMiners

func (x *Index) GetMiners() map[string]*Slashes

func (*Index) GetTipSetKey

func (x *Index) GetTipSetKey() string

func (*Index) ProtoMessage

func (*Index) ProtoMessage()

func (*Index) ProtoReflect

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

func (*Index) Reset

func (x *Index) Reset()

func (*Index) String

func (x *Index) String() string

type RPC

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

RPC implements the gprc service

func New

func New(si *slashing.Index) *RPC

New creates a new rpc service

func (*RPC) Get

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

Get calls slashing index Get

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 Slashes

type Slashes struct {
	Epochs []uint64 `protobuf:"varint,1,rep,packed,name=epochs,proto3" json:"epochs,omitempty"`
	// contains filtered or unexported fields
}

func (*Slashes) Descriptor deprecated

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

Deprecated: Use Slashes.ProtoReflect.Descriptor instead.

func (*Slashes) GetEpochs

func (x *Slashes) GetEpochs() []uint64

func (*Slashes) ProtoMessage

func (*Slashes) ProtoMessage()

func (*Slashes) ProtoReflect

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

func (*Slashes) Reset

func (x *Slashes) Reset()

func (*Slashes) String

func (x *Slashes) String() string

type UnimplementedRPCServer

type UnimplementedRPCServer struct {
}

UnimplementedRPCServer can be embedded to have forward compatible implementations.

func (*UnimplementedRPCServer) Get

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL