Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface { StateListMiners(context.Context, *types.TipSet) ([]address.Address, error) ClientQueryAsk(ctx context.Context, p peer.ID, miner address.Address) (*types.SignedStorageAsk, error) StateMinerPeerID(ctx context.Context, m address.Address, ts *types.TipSet) (peer.ID, error) }
API provides an abstraction to a Filecoin full-node
type AskIndex ¶
type AskIndex struct {
// contains filtered or unexported fields
}
AskIndex contains cached information about markets
func New ¶
New returnas a new AskIndex. It loads saved information from ds, and immeediatelly starts keeping the cache up to date.
func (*AskIndex) Listen ¶
func (ai *AskIndex) Listen() <-chan struct{}
Listen returns a new channel signaler that notifies when the index gets updated.
func (*AskIndex) Query ¶
func (ai *AskIndex) Query(q Query) ([]StorageAsk, error)
Query executes a query to retrieve active Asks
func (*AskIndex) Unregister ¶
func (ai *AskIndex) Unregister(c chan struct{})
Unregister unregisters a channel signaler from the signaler hub
type Index ¶
type Index struct { LastUpdated time.Time StorageMedianPrice uint64 Storage map[string]StorageAsk }
Index contains Ask information from markets
type Service ¶
type Service struct { pb.UnimplementedAPIServer // contains filtered or unexported fields }
Service implements the gprc service
func NewService ¶
NewService is a helper to create a new Service
func (*Service) Query ¶
func (s *Service) Query(ctx context.Context, req *pb.QueryRequest) (*pb.QueryReply, error)
Query calls askIndex.Query
Click to show internal directories.
Click to hide internal directories.