rpc

package
v0.6.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_index_faults_rpc_rpc_proto protoreflect.FileDescriptor

Functions

func RegisterRPCServiceServer

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

Types

type Faults

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

func (*Faults) Descriptor deprecated

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

Deprecated: Use Faults.ProtoReflect.Descriptor instead.

func (*Faults) GetEpochs

func (x *Faults) GetEpochs() []int64

func (*Faults) ProtoMessage

func (*Faults) ProtoMessage()

func (*Faults) ProtoReflect

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

func (*Faults) Reset

func (x *Faults) Reset()

func (*Faults) String

func (x *Faults) 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 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 {
	Tipsetkey string             `protobuf:"bytes,1,opt,name=tipsetkey,proto3" json:"tipsetkey,omitempty"`
	Miners    map[string]*Faults `` /* 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]*Faults

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 {
	UnimplementedRPCServiceServer
	// contains filtered or unexported fields
}

RPC implements the gprc service.

func New

func New(fi faults.Module) *RPC

New creates a new rpc service.

func (*RPC) Get

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

Get calls faults 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

Jump to

Keyboard shortcuts

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