Documentation
¶
Index ¶
- type Config
- type Service
- func (s *Service) CalculateDealPrice(ctx context.Context, req *pb.CalculateDealPriceRequest) (*pb.CalculateDealPriceResponse, error)
- func (s *Service) GetMinerInfo(ctx context.Context, req *pb.GetMinerInfoRequest) (*pb.GetMinerInfoResponse, error)
- func (s *Service) QueryIndex(ctx context.Context, req *pb.QueryIndexRequest) (*pb.QueryIndexResponse, error)
- func (s *Service) Start() error
- func (s *Service) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ListenAddrGRPC ma.Multiaddr ListenAddrREST string Debug bool DBURI string DBName string PowAddrAPI string PowAdminToken string CollectorRunOnStart bool CollectorFrequency time.Duration CollectorFetchLimit int CollectorFetchTimeout time.Duration IndexerRunOnStart bool IndexerFrequency time.Duration IndexerSnapshotMaxAge time.Duration }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) CalculateDealPrice ¶
func (s *Service) CalculateDealPrice(ctx context.Context, req *pb.CalculateDealPriceRequest) (*pb.CalculateDealPriceResponse, error)
CalculateDealPrice calculates deal price for a miner.
func (*Service) GetMinerInfo ¶
func (s *Service) GetMinerInfo(ctx context.Context, req *pb.GetMinerInfoRequest) (*pb.GetMinerInfoResponse, error)
GetMinerInfo returns miner's index information for a miner. If no information is available, it returns a codes.NotFound status code.
func (*Service) QueryIndex ¶
func (s *Service) QueryIndex(ctx context.Context, req *pb.QueryIndexRequest) (*pb.QueryIndexResponse, error)
Click to show internal directories.
Click to hide internal directories.