Documentation ¶
Index ¶
- type Client
- func (c *Client) CalculateDealPrice(ctx context.Context, minersAddr []string, dataSizeBytes int64, ...) (*pb.CalculateDealPriceResponse, error)
- func (c *Client) Close() error
- func (c *Client) GetMinerInfo(ctx context.Context, minerAddr string) (*pb.GetMinerInfoResponse, error)
- func (c *Client) QueryIndex(ctx context.Context, params *pb.QueryIndexRequest) (*pb.QueryIndexResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides the client api.
func NewClient ¶
func NewClient(target string, opts ...grpc.DialOption) (*Client, error)
NewClient starts the client.
func (*Client) CalculateDealPrice ¶
func (c *Client) CalculateDealPrice(ctx context.Context, minersAddr []string, dataSizeBytes int64, durationDays int64) (*pb.CalculateDealPriceResponse, error)
CalcualteDealPrice calcualtes the deal price for the provided data for a list of miners.
func (*Client) GetMinerInfo ¶
func (c *Client) GetMinerInfo(ctx context.Context, minerAddr string) (*pb.GetMinerInfoResponse, error)
GetMinerInfo returns miner's information from the index.
func (*Client) QueryIndex ¶
func (c *Client) QueryIndex(ctx context.Context, params *pb.QueryIndexRequest) (*pb.QueryIndexResponse, error)
Click to show internal directories.
Click to hide internal directories.