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

package rpc

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

Index

Package Files

rpc.go rpc.pb.go

Variables

var File_index_ask_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 {
    LastUpdated        int64                  `protobuf:"varint,1,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"`
    StorageMedianPrice uint64                 `protobuf:"varint,2,opt,name=storage_median_price,json=storageMedianPrice,proto3" json:"storage_median_price,omitempty"`
    Storage            map[string]*StorageAsk `protobuf:"bytes,3,rep,name=storage,proto3" json:"storage,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    // contains filtered or unexported fields
}

func (*Index) Descriptor Uses

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

Deprecated: Use Index.ProtoReflect.Descriptor instead.

func (*Index) GetLastUpdated Uses

func (x *Index) GetLastUpdated() int64

func (*Index) GetStorage Uses

func (x *Index) GetStorage() map[string]*StorageAsk

func (*Index) GetStorageMedianPrice Uses

func (x *Index) GetStorageMedianPrice() uint64

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 Query Uses

type Query struct {
    MaxPrice  uint64 `protobuf:"varint,1,opt,name=max_price,json=maxPrice,proto3" json:"max_price,omitempty"`
    PieceSize uint64 `protobuf:"varint,2,opt,name=piece_size,json=pieceSize,proto3" json:"piece_size,omitempty"`
    Limit     int32  `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
    Offset    int32  `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"`
    // contains filtered or unexported fields
}

func (*Query) Descriptor Uses

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

Deprecated: Use Query.ProtoReflect.Descriptor instead.

func (*Query) GetLimit Uses

func (x *Query) GetLimit() int32

func (*Query) GetMaxPrice Uses

func (x *Query) GetMaxPrice() uint64

func (*Query) GetOffset Uses

func (x *Query) GetOffset() int32

func (*Query) GetPieceSize Uses

func (x *Query) GetPieceSize() uint64

func (*Query) ProtoMessage Uses

func (*Query) ProtoMessage()

func (*Query) ProtoReflect Uses

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

func (*Query) Reset Uses

func (x *Query) Reset()

func (*Query) String Uses

func (x *Query) String() string

type QueryRequest Uses

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

func (*QueryRequest) Descriptor Uses

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

Deprecated: Use QueryRequest.ProtoReflect.Descriptor instead.

func (*QueryRequest) GetQuery Uses

func (x *QueryRequest) GetQuery() *Query

func (*QueryRequest) ProtoMessage Uses

func (*QueryRequest) ProtoMessage()

func (*QueryRequest) ProtoReflect Uses

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

func (*QueryRequest) Reset Uses

func (x *QueryRequest) Reset()

func (*QueryRequest) String Uses

func (x *QueryRequest) String() string

type QueryResponse Uses

type QueryResponse struct {
    Asks []*StorageAsk `protobuf:"bytes,1,rep,name=asks,proto3" json:"asks,omitempty"`
    // contains filtered or unexported fields
}

func (*QueryResponse) Descriptor Uses

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

Deprecated: Use QueryResponse.ProtoReflect.Descriptor instead.

func (*QueryResponse) GetAsks Uses

func (x *QueryResponse) GetAsks() []*StorageAsk

func (*QueryResponse) ProtoMessage Uses

func (*QueryResponse) ProtoMessage()

func (*QueryResponse) ProtoReflect Uses

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

func (*QueryResponse) Reset Uses

func (x *QueryResponse) Reset()

func (*QueryResponse) String Uses

func (x *QueryResponse) String() string

type RPC Uses

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

RPC implements the gprc service.

func New Uses

func New(ai ask.Module) *RPC

New creates a new rpc service.

func (*RPC) Get Uses

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

Get returns the current Ask Storage index.

func (*RPC) Query Uses

func (s *RPC) Query(ctx context.Context, req *QueryRequest) (*QueryResponse, error)

Query executes a query on the current Ask Storage index.

type RPCServiceClient Uses

type RPCServiceClient interface {
    Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
    Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, 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)
    Query(context.Context, *QueryRequest) (*QueryResponse, error)
}

RPCServiceServer is the server API for RPCService service.

type StorageAsk Uses

type StorageAsk struct {
    Price        uint64 `protobuf:"varint,1,opt,name=price,proto3" json:"price,omitempty"`
    MinPieceSize uint64 `protobuf:"varint,2,opt,name=min_piece_size,json=minPieceSize,proto3" json:"min_piece_size,omitempty"`
    Miner        string `protobuf:"bytes,3,opt,name=miner,proto3" json:"miner,omitempty"`
    Timestamp    int64  `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
    Expiry       int64  `protobuf:"varint,5,opt,name=expiry,proto3" json:"expiry,omitempty"`
    // contains filtered or unexported fields
}

func (*StorageAsk) Descriptor Uses

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

Deprecated: Use StorageAsk.ProtoReflect.Descriptor instead.

func (*StorageAsk) GetExpiry Uses

func (x *StorageAsk) GetExpiry() int64

func (*StorageAsk) GetMinPieceSize Uses

func (x *StorageAsk) GetMinPieceSize() uint64

func (*StorageAsk) GetMiner Uses

func (x *StorageAsk) GetMiner() string

func (*StorageAsk) GetPrice Uses

func (x *StorageAsk) GetPrice() uint64

func (*StorageAsk) GetTimestamp Uses

func (x *StorageAsk) GetTimestamp() int64

func (*StorageAsk) ProtoMessage Uses

func (*StorageAsk) ProtoMessage()

func (*StorageAsk) ProtoReflect Uses

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

func (*StorageAsk) Reset Uses

func (x *StorageAsk) Reset()

func (*StorageAsk) String Uses

func (x *StorageAsk) String() string

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)

func (*UnimplementedRPCServiceServer) Query Uses

func (*UnimplementedRPCServiceServer) Query(context.Context, *QueryRequest) (*QueryResponse, error)

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